@Only-api
@Post
@Get
@Delete
@Observation
Feature: Blood before and after tranplant resource actions
Description: This feature checks the patient resource actions, get, post and delete made on FHIR specific Observation node. This resource is part of the Stem Cell Transplantation.
File name: xaw.feature
Relative path: api/xaw.feature
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:13:34.023 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:13:34.665 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:13:34.665 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9KYflp5M4TmGU791"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21823/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:13:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21823/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:13:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:13:34.665 [print] {
"resourceType": "Observation",
"id": "21823",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:13:37.881+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:13:34.665 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:13:34.667 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:13:34.667 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9KYflp5M4TmGU791"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21823/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:13:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21823/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:13:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:13:34.667 [print] {
"resourceType": "Observation",
"id": "21823",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:13:37.881+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:13:34.667 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:13:35.269 [print] {
"resourceType": "Observation",
"id": "21823",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:13:37.881+02:00",
"source": "#9KYflp5M4TmGU791",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:13:35.869 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:13:36.497 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:13:39.109+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:13:39.109+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:13:36.498 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:13:37.134 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:13:37.134 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7s23IYo0KxS66AoF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21824/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:13:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21824/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:13:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:13:37.135 [print] {
"resourceType": "Observation",
"id": "21824",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:13:40.368+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:13:37.135 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:13:37.136 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:13:37.136 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7s23IYo0KxS66AoF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21824/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:13:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21824/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:13:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:13:37.136 [print] {
"resourceType": "Observation",
"id": "21824",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:13:40.368+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:13:37.136 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:13:37.767 [print] {
"resourceType": "Observation",
"id": "21824",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:13:40.368+02:00",
"source": "#7s23IYo0KxS66AoF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:13:38.373 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:13:38.970 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:13:41.615+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:13:41.615+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:13:38.972 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:13:39.611 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:13:39.611 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BerWS4YDTDWUoGmz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21825/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:13:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21825/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:13:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:13:39.611 [print] {
"resourceType": "Observation",
"id": "21825",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:13:42.846+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:13:39.611 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:13:39.612 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:13:39.612 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BerWS4YDTDWUoGmz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21825/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:13:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21825/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:13:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:13:39.612 [print] {
"resourceType": "Observation",
"id": "21825",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:13:42.846+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:13:39.612 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:13:40.232 [print] {
"resourceType": "Observation",
"id": "21825",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:13:42.846+02:00",
"source": "#BerWS4YDTDWUoGmz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:13:40.966 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 13ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 13ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:13:41.596 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:13:44.200+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:13:44.200+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:13:41.597 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:13:42.219 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:13:42.219 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Jl7wG2f8RaBpKh51"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21826/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:13:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21826/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:13:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:13:42.219 [print] {
"resourceType": "Observation",
"id": "21826",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:13:45.447+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:13:42.219 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:13:42.220 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:13:42.220 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Jl7wG2f8RaBpKh51"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21826/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:13:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21826/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:13:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:13:42.220 [print] {
"resourceType": "Observation",
"id": "21826",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:13:45.447+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:13:42.220 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:13:42.849 [print] {
"resourceType": "Observation",
"id": "21826",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:13:45.447+02:00",
"source": "#Jl7wG2f8RaBpKh51",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:13:43.472 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:13:44.079 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:13:46.699+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:13:46.699+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:13:44.080 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:13:44.714 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:13:44.715 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KATGzfIhHdXhP62m"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21827/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:13:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21827/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:13:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:13:44.715 [print] {
"resourceType": "Observation",
"id": "21827",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:13:47.911+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:13:44.715 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:13:44.716 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:13:44.716 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KATGzfIhHdXhP62m"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21827/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:13:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21827/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:13:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:13:44.716 [print] {
"resourceType": "Observation",
"id": "21827",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:13:47.911+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:13:44.716 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:13:45.313 [print] {
"resourceType": "Observation",
"id": "21827",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:13:47.911+02:00",
"source": "#KATGzfIhHdXhP62m",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:13:45.920 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:13:46.558 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:13:49.156+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:13:49.156+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:13:46.558 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:13:47.186 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:13:47.186 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CABe8a2si33PEYId"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21828/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:13:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21828/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:13:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:13:47.186 [print] {
"resourceType": "Observation",
"id": "21828",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:13:50.417+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:13:47.186 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:13:47.188 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:13:47.188 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CABe8a2si33PEYId"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21828/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:13:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21828/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:13:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:13:47.188 [print] {
"resourceType": "Observation",
"id": "21828",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:13:50.417+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:13:47.188 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:13:48.817 [print] {
"resourceType": "Observation",
"id": "21828",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:13:50.417+02:00",
"source": "#CABe8a2si33PEYId",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:13:50.709 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:13:51.328 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:13:53.942+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:13:53.942+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:13:51.330 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:13:51.997 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:13:51.998 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jP8yC0NtHNmiFyqY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21829/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:13:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21829/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:13:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:13:51.998 [print] {
"resourceType": "Observation",
"id": "21829",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:13:55.231+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:13:51.998 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:13:51.999 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:13:51.999 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jP8yC0NtHNmiFyqY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21829/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:13:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21829/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:13:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:13:51.999 [print] {
"resourceType": "Observation",
"id": "21829",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:13:55.231+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:13:51.999 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:13:52.891 [print] {
"resourceType": "Observation",
"id": "21829",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:13:55.231+02:00",
"source": "#jP8yC0NtHNmiFyqY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:13:54.133 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 17ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 17ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:13:54.735 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:13:57.355+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:13:57.355+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:13:54.737 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:13:55.364 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:13:55.364 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TB8wvl7UeQZsO0qx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21830/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:13:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21830/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:13:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:13:55.364 [print] {
"resourceType": "Observation",
"id": "21830",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:13:58.603+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:13:55.364 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:13:55.365 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:13:55.365 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TB8wvl7UeQZsO0qx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21830/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:13:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21830/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:13:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:13:55.365 [print] {
"resourceType": "Observation",
"id": "21830",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:13:58.603+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:13:55.365 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:13:55.995 [print] {
"resourceType": "Observation",
"id": "21830",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:13:58.603+02:00",
"source": "#TB8wvl7UeQZsO0qx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:13:56.636 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:13:57.262 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:13:59.868+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:13:59.868+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:13:57.264 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:13:57.904 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:13:57.904 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lJRHVZsoQt4Owe7g"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21831/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21831/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:13:57.904 [print] {
"resourceType": "Observation",
"id": "21831",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:01.138+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:13:57.904 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:13:57.906 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:13:57.906 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lJRHVZsoQt4Owe7g"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21831/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21831/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:13:57.906 [print] {
"resourceType": "Observation",
"id": "21831",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:01.138+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:13:57.906 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:13:58.766 [print] {
"resourceType": "Observation",
"id": "21831",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:01.138+02:00",
"source": "#lJRHVZsoQt4Owe7g",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:13:59.728 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:14:00.351 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:14:02.946+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:14:02.946+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:14:00.353 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:01.005 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:01.005 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Cfe9LksjhTgTOVDy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21832/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21832/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:01.006 [print] {
"resourceType": "Observation",
"id": "21832",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:04.214+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:14:01.006 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:01.007 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:01.007 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Cfe9LksjhTgTOVDy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21832/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21832/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:01.007 [print] {
"resourceType": "Observation",
"id": "21832",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:04.214+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:14:01.007 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:14:01.618 [print] {
"resourceType": "Observation",
"id": "21832",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:04.214+02:00",
"source": "#Cfe9LksjhTgTOVDy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:14:02.227 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:14:03.066 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:14:05.469+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:14:05.469+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:14:03.067 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:03.783 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:03.783 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"J3hD33wiKKTLJggX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21833/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21833/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:03.783 [print] {
"resourceType": "Observation",
"id": "21833",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:06.970+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:14:03.783 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:03.784 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:03.784 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"J3hD33wiKKTLJggX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21833/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21833/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:03.784 [print] {
"resourceType": "Observation",
"id": "21833",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:06.970+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:14:03.784 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:14:04.645 [print] {
"resourceType": "Observation",
"id": "21833",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:06.970+02:00",
"source": "#J3hD33wiKKTLJggX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:14:05.264 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:14:05.879 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:14:08.498+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:14:08.498+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:14:05.880 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:06.484 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:06.484 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"swXzm2ZM5Bq2rrIs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21834/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21834/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:06.484 [print] {
"resourceType": "Observation",
"id": "21834",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:09.723+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:14:06.484 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:06.486 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:06.486 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"swXzm2ZM5Bq2rrIs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21834/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21834/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:06.486 [print] {
"resourceType": "Observation",
"id": "21834",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:09.723+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:14:06.486 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:14:07.102 [print] {
"resourceType": "Observation",
"id": "21834",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:09.723+02:00",
"source": "#swXzm2ZM5Bq2rrIs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:14:07.709 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:14:08.336 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:14:10.950+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:14:10.950+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:14:08.338 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:08.988 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:08.988 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"apySd1QlOXfretGI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21835/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21835/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:08.988 [print] {
"resourceType": "Observation",
"id": "21835",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:12.223+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:14:08.988 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:08.989 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:08.989 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"apySd1QlOXfretGI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21835/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21835/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:08.989 [print] {
"resourceType": "Observation",
"id": "21835",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:12.223+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:14:08.989 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:14:09.832 [print] {
"resourceType": "Observation",
"id": "21835",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:12.223+02:00",
"source": "#apySd1QlOXfretGI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:14:10.448 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:14:11.059 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:14:13.688+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:14:13.688+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:14:11.060 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:11.682 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:11.682 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"or8cKZgzWTARj72Q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21836/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21836/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:11.682 [print] {
"resourceType": "Observation",
"id": "21836",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:14.911+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:14:11.682 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:11.683 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:11.683 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"or8cKZgzWTARj72Q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21836/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21836/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:11.683 [print] {
"resourceType": "Observation",
"id": "21836",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:14.911+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:14:11.683 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:14:12.529 [print] {
"resourceType": "Observation",
"id": "21836",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:14.911+02:00",
"source": "#or8cKZgzWTARj72Q",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:14:13.352 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:14:13.976 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:14:16.590+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:14:16.590+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:14:13.978 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:14.640 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"981"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:14.641 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iVPh1rgRYt4jJf4Z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21837/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21837/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:14.641 [print] {
"resourceType": "Observation",
"id": "21837",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:17.844+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:14:14.641 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:14.642 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"981"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:14.642 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iVPh1rgRYt4jJf4Z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21837/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21837/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:14.642 [print] {
"resourceType": "Observation",
"id": "21837",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:17.844+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:14:14.642 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:14:15.423 [print] {
"resourceType": "Observation",
"id": "21837",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:17.844+02:00",
"source": "#iVPh1rgRYt4jJf4Z",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:14:16.055 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:14:16.669 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:14:19.284+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:14:19.284+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:14:16.670 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:17.311 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:17.311 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SpHGwfwH2kShw5hK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21838/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21838/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:17.311 [print] {
"resourceType": "Observation",
"id": "21838",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:20.519+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:14:17.311 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:17.312 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:17.312 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SpHGwfwH2kShw5hK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21838/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21838/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:17.312 [print] {
"resourceType": "Observation",
"id": "21838",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:20.519+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:14:17.312 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:14:18.102 [print] {
"resourceType": "Observation",
"id": "21838",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:20.519+02:00",
"source": "#SpHGwfwH2kShw5hK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:14:18.728 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:14:19.379 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:14:21.953+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:14:21.953+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:14:19.381 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:20.035 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:20.035 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mEnrYhXybVA8zcBx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21839/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21839/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:20.035 [print] {
"resourceType": "Observation",
"id": "21839",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:23.267+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:14:20.035 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:20.036 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:20.036 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mEnrYhXybVA8zcBx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21839/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21839/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:20.036 [print] {
"resourceType": "Observation",
"id": "21839",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:23.267+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:14:20.036 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:14:20.764 [print] {
"resourceType": "Observation",
"id": "21839",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:23.267+02:00",
"source": "#mEnrYhXybVA8zcBx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:14:21.388 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 12ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 12ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:14:22.040 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:14:24.621+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:14:24.621+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:14:22.041 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:22.659 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:22.659 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hINJ5pftL7Kat11Q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21840/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21840/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:22.659 [print] {
"resourceType": "Observation",
"id": "21840",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:25.894+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:14:22.659 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:22.661 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:22.661 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hINJ5pftL7Kat11Q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21840/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21840/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:22.661 [print] {
"resourceType": "Observation",
"id": "21840",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:25.894+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:14:22.661 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:14:23.280 [print] {
"resourceType": "Observation",
"id": "21840",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:25.894+02:00",
"source": "#hINJ5pftL7Kat11Q",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:14:23.923 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:14:24.738 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:14:27.160+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:14:27.160+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:14:24.740 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:25.402 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:25.402 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2SqRC01bpvWNX8SU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21841/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21841/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:25.402 [print] {
"resourceType": "Observation",
"id": "21841",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:28.614+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:14:25.402 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:25.403 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:25.403 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2SqRC01bpvWNX8SU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21841/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21841/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:25.403 [print] {
"resourceType": "Observation",
"id": "21841",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:28.614+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:14:25.404 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:14:26.005 [print] {
"resourceType": "Observation",
"id": "21841",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:28.614+02:00",
"source": "#2SqRC01bpvWNX8SU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:14:26.618 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:14:27.229 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:14:29.848+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:14:29.848+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:14:27.230 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:27.845 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:27.845 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"w52fjSiG8uCQ3EXu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21842/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21842/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:27.845 [print] {
"resourceType": "Observation",
"id": "21842",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:31.084+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:14:27.845 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:27.846 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:27.846 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"w52fjSiG8uCQ3EXu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21842/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21842/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:27.846 [print] {
"resourceType": "Observation",
"id": "21842",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:31.084+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:14:27.846 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:14:28.457 [print] {
"resourceType": "Observation",
"id": "21842",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:31.084+02:00",
"source": "#w52fjSiG8uCQ3EXu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:14:29.343 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:14:29.990 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:14:32.577+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:14:32.577+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:14:29.991 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:30.618 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:30.618 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oTWosJnPu9cfhuCi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21843/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21843/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:30.618 [print] {
"resourceType": "Observation",
"id": "21843",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:33.850+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:14:30.618 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:30.620 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:30.620 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oTWosJnPu9cfhuCi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21843/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21843/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:30.620 [print] {
"resourceType": "Observation",
"id": "21843",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:33.850+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:14:30.620 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:14:31.247 [print] {
"resourceType": "Observation",
"id": "21843",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:33.850+02:00",
"source": "#oTWosJnPu9cfhuCi",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:14:31.874 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:14:32.489 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:14:35.111+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:14:35.111+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:14:32.490 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:33.121 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:33.121 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VAIrR4gdNfv3YMuh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21844/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21844/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:33.121 [print] {
"resourceType": "Observation",
"id": "21844",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:36.354+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:14:33.121 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:33.122 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:33.122 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VAIrR4gdNfv3YMuh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21844/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21844/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:33.122 [print] {
"resourceType": "Observation",
"id": "21844",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:36.354+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:14:33.122 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:14:33.767 [print] {
"resourceType": "Observation",
"id": "21844",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:36.354+02:00",
"source": "#VAIrR4gdNfv3YMuh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:14:34.659 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:14:35.294 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:14:37.891+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:14:37.891+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:14:35.296 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:35.971 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:35.971 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MXPQ2WpCgUWNzx6J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21845/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21845/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:35.971 [print] {
"resourceType": "Observation",
"id": "21845",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:39.170+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:14:35.971 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:35.973 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:35.973 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MXPQ2WpCgUWNzx6J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21845/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21845/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:35.973 [print] {
"resourceType": "Observation",
"id": "21845",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:39.170+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:14:35.973 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:14:36.566 [print] {
"resourceType": "Observation",
"id": "21845",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:39.170+02:00",
"source": "#MXPQ2WpCgUWNzx6J",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:14:37.220 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:14:37.893 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:14:40.453+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:14:40.453+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:14:37.895 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:38.525 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:38.525 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PMkRlXl2FjKP9Me6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21846/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21846/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:38.525 [print] {
"resourceType": "Observation",
"id": "21846",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:41.756+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:14:38.525 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:38.526 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:38.526 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PMkRlXl2FjKP9Me6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21846/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21846/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:38.526 [print] {
"resourceType": "Observation",
"id": "21846",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:41.756+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:14:38.526 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:14:39.170 [print] {
"resourceType": "Observation",
"id": "21846",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:41.756+02:00",
"source": "#PMkRlXl2FjKP9Me6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:14:39.787 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:14:40.391 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:14:43.020+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:14:43.020+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:14:40.393 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:40.999 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:40.999 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"poupJqqgultbQ4IV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21847/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21847/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:40.999 [print] {
"resourceType": "Observation",
"id": "21847",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:44.227+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:14:40.999 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:41.000 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:41.000 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"poupJqqgultbQ4IV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21847/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21847/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:41.000 [print] {
"resourceType": "Observation",
"id": "21847",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:44.227+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:14:41.000 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:14:41.604 [print] {
"resourceType": "Observation",
"id": "21847",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:44.227+02:00",
"source": "#poupJqqgultbQ4IV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:14:42.241 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:14:42.842 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:14:45.483+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:14:45.483+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:14:42.843 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:43.447 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:43.447 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1fTkH24G2xpfblwm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21848/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21848/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:43.447 [print] {
"resourceType": "Observation",
"id": "21848",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:46.682+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:14:43.447 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:43.448 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:43.448 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1fTkH24G2xpfblwm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21848/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21848/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:43.448 [print] {
"resourceType": "Observation",
"id": "21848",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:46.682+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:14:43.448 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:14:44.086 [print] {
"resourceType": "Observation",
"id": "21848",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:46.682+02:00",
"source": "#1fTkH24G2xpfblwm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:14:44.708 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:14:45.330 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:14:47.941+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:14:47.941+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:14:45.331 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:45.978 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:45.978 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"a3igjMSFfwHyz6rD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21849/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21849/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:45.978 [print] {
"resourceType": "Observation",
"id": "21849",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:49.207+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:14:45.978 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:45.979 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:45.979 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"a3igjMSFfwHyz6rD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21849/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21849/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:45.979 [print] {
"resourceType": "Observation",
"id": "21849",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:49.207+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:14:45.979 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:14:46.576 [print] {
"resourceType": "Observation",
"id": "21849",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:49.207+02:00",
"source": "#a3igjMSFfwHyz6rD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:14:47.225 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:14:47.828 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:14:50.454+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:14:50.454+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:14:47.829 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:48.438 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:48.438 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CGNRl9mp4wp0hLSN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21850/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21850/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:48.438 [print] {
"resourceType": "Observation",
"id": "21850",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:51.676+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:14:48.438 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:48.439 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:48.439 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CGNRl9mp4wp0hLSN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21850/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21850/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:48.439 [print] {
"resourceType": "Observation",
"id": "21850",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:51.676+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:14:48.439 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:14:49.068 [print] {
"resourceType": "Observation",
"id": "21850",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:51.676+02:00",
"source": "#CGNRl9mp4wp0hLSN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:14:49.781 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:14:50.409 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:14:53.020+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:14:53.020+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:14:50.410 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:51.027 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:51.027 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aJB9dSCnL4WtYxBn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21851/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21851/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:51.027 [print] {
"resourceType": "Observation",
"id": "21851",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:54.261+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:14:51.027 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:51.028 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:51.028 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aJB9dSCnL4WtYxBn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21851/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21851/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:51.028 [print] {
"resourceType": "Observation",
"id": "21851",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:54.261+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:14:51.028 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:14:51.641 [print] {
"resourceType": "Observation",
"id": "21851",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:54.261+02:00",
"source": "#aJB9dSCnL4WtYxBn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:14:52.275 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:14:52.875 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:14:55.506+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:14:55.506+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:14:52.876 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:53.737 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:53.737 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DJqdRPK0y5JV3bDl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21852/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21852/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:53.737 [print] {
"resourceType": "Observation",
"id": "21852",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:56.971+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:14:53.737 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:53.738 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:53.738 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DJqdRPK0y5JV3bDl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21852/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21852/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:53.739 [print] {
"resourceType": "Observation",
"id": "21852",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:56.971+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:14:53.739 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:14:54.363 [print] {
"resourceType": "Observation",
"id": "21852",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:56.971+02:00",
"source": "#DJqdRPK0y5JV3bDl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:14:55.038 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:14:55.659 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:14:58.228+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:14:58.228+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:14:55.661 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:56.288 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"981"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:56.288 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TD9iyJAAjQ9LBKSu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21853/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21853/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:56.288 [print] {
"resourceType": "Observation",
"id": "21853",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:59.518+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:14:56.288 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:56.289 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"981"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:56.289 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TD9iyJAAjQ9LBKSu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21853/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:14:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21853/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:14:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:56.289 [print] {
"resourceType": "Observation",
"id": "21853",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:59.518+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:14:56.289 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:14:56.898 [print] {
"resourceType": "Observation",
"id": "21853",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:14:59.518+02:00",
"source": "#TD9iyJAAjQ9LBKSu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:14:57.622 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:14:58.538 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:15:00.862+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:15:00.862+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:14:58.539 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:59.189 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:59.189 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"O4A6Hy9uW3GqMX4L"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21854/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21854/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:59.189 [print] {
"resourceType": "Observation",
"id": "21854",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:02.406+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:14:59.189 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:14:59.190 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:14:59.190 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"O4A6Hy9uW3GqMX4L"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21854/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21854/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:14:59.190 [print] {
"resourceType": "Observation",
"id": "21854",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:02.406+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:14:59.190 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:15:00.197 [print] {
"resourceType": "Observation",
"id": "21854",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:02.406+02:00",
"source": "#O4A6Hy9uW3GqMX4L",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:15:00.930 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:15:01.555 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:15:04.153+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:15:04.153+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:15:01.557 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:02.185 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:02.185 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Oi7Z5c5uYafSblIA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21855/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21855/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:02.185 [print] {
"resourceType": "Observation",
"id": "21855",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:05.397+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:15:02.185 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:02.186 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:02.186 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Oi7Z5c5uYafSblIA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21855/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21855/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:02.186 [print] {
"resourceType": "Observation",
"id": "21855",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:05.397+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:15:02.186 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:15:02.797 [print] {
"resourceType": "Observation",
"id": "21855",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:05.397+02:00",
"source": "#Oi7Z5c5uYafSblIA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:15:03.421 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 15ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 15ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:15:04.031 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:15:06.653+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:15:06.653+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:15:04.031 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:04.729 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:04.729 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"u5DO324fhc7e1kpP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21856/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21856/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:04.730 [print] {
"resourceType": "Observation",
"id": "21856",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:07.952+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:15:04.730 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:04.731 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:04.731 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"u5DO324fhc7e1kpP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21856/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21856/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:04.731 [print] {
"resourceType": "Observation",
"id": "21856",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:07.952+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:15:04.731 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:15:05.358 [print] {
"resourceType": "Observation",
"id": "21856",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:07.952+02:00",
"source": "#u5DO324fhc7e1kpP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:15:05.990 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:15:06.585 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:15:09.229+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:15:09.229+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:15:06.587 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:07.212 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:07.213 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mhAuyqHbfacSNNjc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21857/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21857/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:07.213 [print] {
"resourceType": "Observation",
"id": "21857",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:10.443+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:15:07.213 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:07.214 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:07.214 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mhAuyqHbfacSNNjc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21857/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21857/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:07.214 [print] {
"resourceType": "Observation",
"id": "21857",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:10.443+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:15:07.214 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:15:07.813 [print] {
"resourceType": "Observation",
"id": "21857",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:10.443+02:00",
"source": "#mhAuyqHbfacSNNjc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:15:08.789 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:15:09.442 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:15:12.021+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:15:12.021+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:15:09.443 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:10.122 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:10.122 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WtnDHhHL1713k4pM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21858/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21858/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:10.122 [print] {
"resourceType": "Observation",
"id": "21858",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:13.353+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:15:10.123 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:10.124 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:10.124 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WtnDHhHL1713k4pM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21858/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21858/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:10.124 [print] {
"resourceType": "Observation",
"id": "21858",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:13.353+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:15:10.124 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:15:11.017 [print] {
"resourceType": "Observation",
"id": "21858",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:13.353+02:00",
"source": "#WtnDHhHL1713k4pM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:15:11.636 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:15:12.223 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:15:14.878+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:15:14.878+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:15:12.225 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:12.844 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:12.844 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YIPMDybVi2a3ebAQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21859/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21859/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:12.844 [print] {
"resourceType": "Observation",
"id": "21859",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:16.075+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:15:12.844 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:12.846 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:12.846 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YIPMDybVi2a3ebAQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21859/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21859/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:12.846 [print] {
"resourceType": "Observation",
"id": "21859",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:16.075+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:15:12.846 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:15:13.449 [print] {
"resourceType": "Observation",
"id": "21859",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:16.075+02:00",
"source": "#YIPMDybVi2a3ebAQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:15:14.092 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:15:14.735 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:15:17.324+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:15:17.324+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:15:14.736 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:15.330 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:15.330 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZpnA22BWzOsyecIE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21860/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21860/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:15.330 [print] {
"resourceType": "Observation",
"id": "21860",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:18.567+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:15:15.330 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:15.330 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:15.330 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZpnA22BWzOsyecIE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21860/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21860/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:15.330 [print] {
"resourceType": "Observation",
"id": "21860",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:18.567+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:15:15.330 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:15:16.938 [print] {
"resourceType": "Observation",
"id": "21860",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:18.567+02:00",
"source": "#ZpnA22BWzOsyecIE",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:15:17.571 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:15:18.184 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:15:20.808+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:15:20.808+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:15:18.186 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:18.832 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:18.833 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dv87oKSn9KqbKQia"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21861/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21861/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:18.833 [print] {
"resourceType": "Observation",
"id": "21861",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:22.057+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:15:18.833 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:18.834 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:18.834 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dv87oKSn9KqbKQia"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21861/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21861/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:18.834 [print] {
"resourceType": "Observation",
"id": "21861",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:22.057+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:15:18.834 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:15:19.469 [print] {
"resourceType": "Observation",
"id": "21861",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:22.057+02:00",
"source": "#dv87oKSn9KqbKQia",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:15:20.090 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:15:20.701 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:15:23.333+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:15:23.333+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:15:20.702 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:21.584 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:21.584 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PjFB8YaMOXGtQmQv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21862/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21862/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:21.584 [print] {
"resourceType": "Observation",
"id": "21862",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:24.823+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:15:21.584 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:21.585 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:21.585 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PjFB8YaMOXGtQmQv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21862/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21862/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:21.585 [print] {
"resourceType": "Observation",
"id": "21862",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:24.823+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:15:21.586 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:15:22.182 [print] {
"resourceType": "Observation",
"id": "21862",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:24.823+02:00",
"source": "#PjFB8YaMOXGtQmQv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:15:22.781 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:15:23.400 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:15:26.023+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:15:26.023+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:15:23.402 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:24.042 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:24.042 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sgB0NPuFLpLskfHd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21863/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21863/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:24.042 [print] {
"resourceType": "Observation",
"id": "21863",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:27.252+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:15:24.042 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:24.043 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:24.043 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sgB0NPuFLpLskfHd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21863/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21863/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:24.043 [print] {
"resourceType": "Observation",
"id": "21863",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:27.252+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:15:24.043 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:15:24.634 [print] {
"resourceType": "Observation",
"id": "21863",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:27.252+02:00",
"source": "#sgB0NPuFLpLskfHd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:15:25.271 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:15:25.879 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:15:28.512+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:15:28.512+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:15:25.880 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:26.500 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:26.500 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LZWwdWj9OGnuqOUS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21864/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21864/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:26.500 [print] {
"resourceType": "Observation",
"id": "21864",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:29.738+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:15:26.500 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:26.501 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:26.501 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LZWwdWj9OGnuqOUS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21864/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21864/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:26.501 [print] {
"resourceType": "Observation",
"id": "21864",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:29.738+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:15:26.501 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:15:27.110 [print] {
"resourceType": "Observation",
"id": "21864",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:29.738+02:00",
"source": "#LZWwdWj9OGnuqOUS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:15:28.745 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:15:30.441 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:15:31.984+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:15:31.984+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:15:30.442 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:31.076 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:31.076 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7H6Vli4HBwwyjNU4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21865/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21865/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:31.076 [print] {
"resourceType": "Observation",
"id": "21865",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:34.310+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:15:31.076 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:31.077 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:31.077 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7H6Vli4HBwwyjNU4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21865/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21865/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:31.077 [print] {
"resourceType": "Observation",
"id": "21865",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:34.310+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:15:31.077 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:15:31.682 [print] {
"resourceType": "Observation",
"id": "21865",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:34.310+02:00",
"source": "#7H6Vli4HBwwyjNU4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:15:32.285 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:15:32.900 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:15:35.524+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:15:35.524+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:15:32.901 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:33.782 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:33.782 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vXWCsahJStpgB6Rj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21866/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21866/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:33.782 [print] {
"resourceType": "Observation",
"id": "21866",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:37.021+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:15:33.782 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:33.784 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:33.784 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vXWCsahJStpgB6Rj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21866/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21866/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:33.784 [print] {
"resourceType": "Observation",
"id": "21866",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:37.021+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:15:33.784 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:15:34.411 [print] {
"resourceType": "Observation",
"id": "21866",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:37.021+02:00",
"source": "#vXWCsahJStpgB6Rj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:15:35.034 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:15:35.647 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:15:38.275+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:15:38.275+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:15:35.650 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:36.288 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:36.288 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hhtiVfhaTdGcnmNx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21867/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21867/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:36.288 [print] {
"resourceType": "Observation",
"id": "21867",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:39.522+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:15:36.288 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:36.289 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:36.289 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hhtiVfhaTdGcnmNx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21867/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21867/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:36.289 [print] {
"resourceType": "Observation",
"id": "21867",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:39.522+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:15:36.289 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:15:36.893 [print] {
"resourceType": "Observation",
"id": "21867",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:39.522+02:00",
"source": "#hhtiVfhaTdGcnmNx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:15:37.527 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:15:38.134 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:15:40.766+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:15:40.766+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:15:38.135 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:39.387 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:39.387 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"K3uRtfgiUxNlnte5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21868/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21868/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:39.387 [print] {
"resourceType": "Observation",
"id": "21868",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:42.627+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:15:39.387 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:39.388 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:39.388 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"K3uRtfgiUxNlnte5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21868/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21868/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:39.388 [print] {
"resourceType": "Observation",
"id": "21868",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:42.627+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:15:39.388 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:15:39.981 [print] {
"resourceType": "Observation",
"id": "21868",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:42.627+02:00",
"source": "#K3uRtfgiUxNlnte5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:15:40.652 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:15:41.252 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:15:43.883+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:15:43.883+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:15:41.253 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:41.862 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"981"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:41.862 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1YjkZcEG7Ev7NjHH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21869/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21869/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:41.862 [print] {
"resourceType": "Observation",
"id": "21869",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:45.098+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:15:41.862 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:41.864 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"981"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:41.864 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1YjkZcEG7Ev7NjHH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21869/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21869/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:41.864 [print] {
"resourceType": "Observation",
"id": "21869",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:45.098+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:15:41.864 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:15:42.483 [print] {
"resourceType": "Observation",
"id": "21869",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:45.098+02:00",
"source": "#1YjkZcEG7Ev7NjHH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:15:43.091 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:15:44.784 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:15:46.332+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:15:46.332+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:15:44.785 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:45.410 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:45.410 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KJpsIMNMRBf1Fs8W"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21870/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21870/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:45.410 [print] {
"resourceType": "Observation",
"id": "21870",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:48.648+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:15:45.410 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:45.411 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:45.411 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KJpsIMNMRBf1Fs8W"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21870/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21870/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:45.411 [print] {
"resourceType": "Observation",
"id": "21870",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:48.648+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:15:45.411 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:15:46.004 [print] {
"resourceType": "Observation",
"id": "21870",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:48.648+02:00",
"source": "#KJpsIMNMRBf1Fs8W",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:15:46.611 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:15:47.239 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:15:49.852+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:15:49.852+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:15:47.241 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:47.839 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:47.839 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zXmJRwMiHiKxg1rD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21871/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21871/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:47.839 [print] {
"resourceType": "Observation",
"id": "21871",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:51.072+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:15:47.839 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:47.840 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:47.840 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zXmJRwMiHiKxg1rD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21871/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21871/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:47.840 [print] {
"resourceType": "Observation",
"id": "21871",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:51.072+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:15:47.840 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:15:48.428 [print] {
"resourceType": "Observation",
"id": "21871",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:51.072+02:00",
"source": "#zXmJRwMiHiKxg1rD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:15:49.253 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:15:49.864 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:15:52.488+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:15:52.488+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:15:49.864 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:50.487 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:50.487 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"K8dooVN5huS8aFu0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21872/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21872/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:50.487 [print] {
"resourceType": "Observation",
"id": "21872",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:53.713+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:15:50.487 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:50.488 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:50.488 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"K8dooVN5huS8aFu0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21872/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21872/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:50.489 [print] {
"resourceType": "Observation",
"id": "21872",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:53.713+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:15:50.489 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:15:51.118 [print] {
"resourceType": "Observation",
"id": "21872",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:53.713+02:00",
"source": "#K8dooVN5huS8aFu0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:15:51.720 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:15:52.337 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:15:54.960+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:15:54.960+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:15:52.338 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:52.959 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:52.959 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yricL1LOns6Q66wJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21873/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21873/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:52.959 [print] {
"resourceType": "Observation",
"id": "21873",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:56.182+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:15:52.959 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:52.960 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:52.960 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yricL1LOns6Q66wJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21873/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21873/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:52.960 [print] {
"resourceType": "Observation",
"id": "21873",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:56.182+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:15:52.960 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:15:53.567 [print] {
"resourceType": "Observation",
"id": "21873",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:56.182+02:00",
"source": "#yricL1LOns6Q66wJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:15:54.241 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:15:54.878 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:15:57.439+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:15:57.439+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:15:54.880 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:55.546 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:55.546 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OzvnVE5YVGqyBj3K"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21874/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21874/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:55.546 [print] {
"resourceType": "Observation",
"id": "21874",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:58.753+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:15:55.546 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:55.549 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:55.549 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OzvnVE5YVGqyBj3K"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21874/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:15:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21874/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:15:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:55.549 [print] {
"resourceType": "Observation",
"id": "21874",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:58.753+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:15:55.549 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:15:56.157 [print] {
"resourceType": "Observation",
"id": "21874",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:15:58.753+02:00",
"source": "#OzvnVE5YVGqyBj3K",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:15:57.046 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:15:57.951 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:16:00.276+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:16:00.276+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:15:57.952 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:58.804 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:58.804 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2o4LeWytfRKv93ek"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21875/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21875/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:58.804 [print] {
"resourceType": "Observation",
"id": "21875",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:02.029+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:15:58.804 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:15:58.805 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:15:58.805 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2o4LeWytfRKv93ek"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21875/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21875/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:15:58.805 [print] {
"resourceType": "Observation",
"id": "21875",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:02.029+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:15:58.805 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:15:59.424 [print] {
"resourceType": "Observation",
"id": "21875",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:02.029+02:00",
"source": "#2o4LeWytfRKv93ek",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:16:00.031 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:16:00.635 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:16:03.270+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:16:03.270+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:16:00.636 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:01.243 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:01.244 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hJjX2ggWVwk7urbN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21876/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21876/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:01.244 [print] {
"resourceType": "Observation",
"id": "21876",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:04.482+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:16:01.244 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:01.245 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:01.245 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hJjX2ggWVwk7urbN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21876/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21876/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:01.245 [print] {
"resourceType": "Observation",
"id": "21876",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:04.482+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:16:01.245 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:16:01.864 [print] {
"resourceType": "Observation",
"id": "21876",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:04.482+02:00",
"source": "#hJjX2ggWVwk7urbN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:16:02.473 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:16:03.071 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:16:05.713+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:16:05.713+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:16:03.072 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:03.682 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:03.682 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wh3ewpCawonvlFlT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21877/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21877/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:03.682 [print] {
"resourceType": "Observation",
"id": "21877",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:06.911+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:16:03.682 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:03.683 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:03.683 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wh3ewpCawonvlFlT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21877/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21877/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:03.683 [print] {
"resourceType": "Observation",
"id": "21877",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:06.911+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:16:03.683 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:16:04.325 [print] {
"resourceType": "Observation",
"id": "21877",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:06.911+02:00",
"source": "#wh3ewpCawonvlFlT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:16:04.947 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:16:05.575 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:16:08.183+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:16:08.183+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:16:05.576 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:06.195 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:06.196 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DPZfEOYkHQB8R2Ng"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21878/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21878/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:06.196 [print] {
"resourceType": "Observation",
"id": "21878",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:09.413+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:16:06.196 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:06.197 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:06.197 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DPZfEOYkHQB8R2Ng"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21878/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21878/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:06.197 [print] {
"resourceType": "Observation",
"id": "21878",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:09.413+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:16:06.197 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:16:06.810 [print] {
"resourceType": "Observation",
"id": "21878",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:09.413+02:00",
"source": "#DPZfEOYkHQB8R2Ng",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:16:07.424 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:16:08.316 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:16:10.663+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:16:10.663+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:16:08.317 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:08.932 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:08.932 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5SykDFJ658wQXtsy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21879/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21879/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:08.932 [print] {
"resourceType": "Observation",
"id": "21879",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:12.152+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:16:08.932 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:08.933 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:08.933 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5SykDFJ658wQXtsy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21879/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21879/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:08.933 [print] {
"resourceType": "Observation",
"id": "21879",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:12.152+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:16:08.933 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:16:09.550 [print] {
"resourceType": "Observation",
"id": "21879",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:12.152+02:00",
"source": "#5SykDFJ658wQXtsy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:16:10.155 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:16:10.759 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:16:13.392+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:16:13.392+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:16:10.760 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:11.353 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:11.354 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JoTM7pyeSxhCdAx2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21880/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21880/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:11.354 [print] {
"resourceType": "Observation",
"id": "21880",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:14.589+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:16:11.354 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:11.355 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:11.355 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JoTM7pyeSxhCdAx2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21880/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21880/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:11.355 [print] {
"resourceType": "Observation",
"id": "21880",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:14.589+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:16:11.355 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:16:11.964 [print] {
"resourceType": "Observation",
"id": "21880",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:14.589+02:00",
"source": "#JoTM7pyeSxhCdAx2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:16:12.599 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:16:13.213 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:16:15.820+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:16:15.820+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:16:13.214 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:13.843 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:13.843 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lZOv4SfRwbUmny6D"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21881/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21881/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:13.843 [print] {
"resourceType": "Observation",
"id": "21881",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:17.049+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:16:13.843 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:13.844 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:13.844 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lZOv4SfRwbUmny6D"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21881/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21881/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:13.844 [print] {
"resourceType": "Observation",
"id": "21881",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:17.049+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:16:13.844 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:16:14.441 [print] {
"resourceType": "Observation",
"id": "21881",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:17.049+02:00",
"source": "#lZOv4SfRwbUmny6D",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:16:15.045 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:16:15.643 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:16:18.284+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:16:18.284+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:16:15.644 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:16.306 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:16.306 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"asll9bZm4wBfqbI8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21882/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21882/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:16.306 [print] {
"resourceType": "Observation",
"id": "21882",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:19.535+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:16:16.306 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:16.307 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:16.307 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"asll9bZm4wBfqbI8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21882/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21882/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:16.307 [print] {
"resourceType": "Observation",
"id": "21882",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:19.535+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:16:16.307 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:16:16.900 [print] {
"resourceType": "Observation",
"id": "21882",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:19.535+02:00",
"source": "#asll9bZm4wBfqbI8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:16:17.516 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:16:18.400 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:16:20.753+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:16:20.753+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:16:18.402 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:19.041 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:19.041 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FVVq63ltBZPWNQ3p"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21883/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21883/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:19.041 [print] {
"resourceType": "Observation",
"id": "21883",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:22.253+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:16:19.041 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:19.042 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:19.042 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FVVq63ltBZPWNQ3p"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21883/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21883/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:19.042 [print] {
"resourceType": "Observation",
"id": "21883",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:22.253+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:16:19.042 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:16:19.673 [print] {
"resourceType": "Observation",
"id": "21883",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:22.253+02:00",
"source": "#FVVq63ltBZPWNQ3p",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:16:20.298 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:16:20.897 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:16:23.534+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:16:23.534+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:16:20.898 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:21.546 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:21.546 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VDbTv6KKNrjGRS46"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21884/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21884/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:21.546 [print] {
"resourceType": "Observation",
"id": "21884",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:24.779+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:16:21.546 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:21.548 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:21.548 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VDbTv6KKNrjGRS46"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21884/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21884/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:21.548 [print] {
"resourceType": "Observation",
"id": "21884",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:24.779+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:16:21.548 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:16:22.159 [print] {
"resourceType": "Observation",
"id": "21884",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:24.779+02:00",
"source": "#VDbTv6KKNrjGRS46",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:16:22.772 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:16:23.384 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:16:26.004+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:16:26.004+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:16:23.386 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:24.149 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"981"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:24.149 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iVs8XVspv7lC0gd7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21885/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21885/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:24.149 [print] {
"resourceType": "Observation",
"id": "21885",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:27.377+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:16:24.149 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:24.151 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"981"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:24.151 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iVs8XVspv7lC0gd7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21885/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21885/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:24.151 [print] {
"resourceType": "Observation",
"id": "21885",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:27.377+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:16:24.151 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:16:24.753 [print] {
"resourceType": "Observation",
"id": "21885",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:27.377+02:00",
"source": "#iVs8XVspv7lC0gd7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:16:25.365 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:16:25.990 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:16:28.598+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:16:28.598+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:16:25.991 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:26.612 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:26.612 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"F5IZ2q9PQyJahhuE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21886/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21886/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:26.612 [print] {
"resourceType": "Observation",
"id": "21886",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:29.837+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:16:26.612 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:26.613 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:26.613 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"F5IZ2q9PQyJahhuE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21886/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21886/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:26.613 [print] {
"resourceType": "Observation",
"id": "21886",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:29.837+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:16:26.614 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:16:27.253 [print] {
"resourceType": "Observation",
"id": "21886",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:29.837+02:00",
"source": "#F5IZ2q9PQyJahhuE",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:16:27.862 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:16:28.745 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:16:31.101+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:16:31.101+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:16:28.747 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:29.388 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:29.388 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FwgeNJK78UCniACG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21887/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21887/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:29.388 [print] {
"resourceType": "Observation",
"id": "21887",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:32.610+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:16:29.388 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:29.390 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:29.390 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FwgeNJK78UCniACG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21887/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21887/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:29.390 [print] {
"resourceType": "Observation",
"id": "21887",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:32.610+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:16:29.390 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:16:29.988 [print] {
"resourceType": "Observation",
"id": "21887",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:32.610+02:00",
"source": "#FwgeNJK78UCniACG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:16:30.646 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 16ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 16ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:16:31.246 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:16:33.879+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:16:33.879+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:16:31.247 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:31.896 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:31.896 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YrL06HsgrExpx3LT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21888/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21888/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:31.897 [print] {
"resourceType": "Observation",
"id": "21888",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:35.131+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:16:31.897 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:31.898 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:31.898 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YrL06HsgrExpx3LT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21888/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21888/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:31.898 [print] {
"resourceType": "Observation",
"id": "21888",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:35.131+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:16:31.898 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:16:32.758 [print] {
"resourceType": "Observation",
"id": "21888",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:35.131+02:00",
"source": "#YrL06HsgrExpx3LT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:16:33.376 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:16:34.009 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:16:36.613+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:16:36.613+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:16:34.010 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:35.060 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:35.060 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jx2Xy3zkgnQorhDf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21889/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21889/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:35.060 [print] {
"resourceType": "Observation",
"id": "21889",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:38.272+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:16:35.060 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:35.062 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:35.062 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jx2Xy3zkgnQorhDf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21889/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21889/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:35.062 [print] {
"resourceType": "Observation",
"id": "21889",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:38.272+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:16:35.062 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:16:35.658 [print] {
"resourceType": "Observation",
"id": "21889",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:38.272+02:00",
"source": "#jx2Xy3zkgnQorhDf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:16:36.665 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:16:37.281 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:16:39.896+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:16:39.896+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:16:37.282 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:37.921 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:37.921 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zylKaVRoMAHaRYDu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21890/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21890/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:37.921 [print] {
"resourceType": "Observation",
"id": "21890",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:41.150+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:16:37.921 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:37.923 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:37.923 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zylKaVRoMAHaRYDu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21890/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21890/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:37.923 [print] {
"resourceType": "Observation",
"id": "21890",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:41.150+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:16:37.923 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:16:39.517 [print] {
"resourceType": "Observation",
"id": "21890",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:41.150+02:00",
"source": "#zylKaVRoMAHaRYDu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:16:40.171 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:16:40.778 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:16:43.407+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:16:43.407+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:16:40.780 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:42.623 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:42.624 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8bKCvWYtGAOWQpSI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21891/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21891/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:42.624 [print] {
"resourceType": "Observation",
"id": "21891",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:45.631+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:16:42.624 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:42.625 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:42.625 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8bKCvWYtGAOWQpSI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21891/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21891/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:42.625 [print] {
"resourceType": "Observation",
"id": "21891",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:45.631+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:16:42.625 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:16:43.456 [print] {
"resourceType": "Observation",
"id": "21891",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:45.631+02:00",
"source": "#8bKCvWYtGAOWQpSI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:16:44.279 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:16:45.132 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:16:47.520+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:16:47.520+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:16:45.134 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:45.773 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:45.773 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nlltlcgreO84qXo2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21892/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21892/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:45.773 [print] {
"resourceType": "Observation",
"id": "21892",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:49.007+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:16:45.773 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:45.774 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:45.774 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nlltlcgreO84qXo2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21892/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21892/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:45.774 [print] {
"resourceType": "Observation",
"id": "21892",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:49.007+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:16:45.774 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:16:46.378 [print] {
"resourceType": "Observation",
"id": "21892",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:49.007+02:00",
"source": "#nlltlcgreO84qXo2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:16:47.601 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:16:48.246 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:16:50.821+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:16:50.821+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:16:48.246 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:48.908 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:48.908 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"o8hpiOFRxGidyWhh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21893/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21893/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:48.908 [print] {
"resourceType": "Observation",
"id": "21893",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:52.114+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:16:48.908 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:48.909 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:48.909 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"o8hpiOFRxGidyWhh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21893/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21893/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:48.909 [print] {
"resourceType": "Observation",
"id": "21893",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:52.114+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:16:48.909 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:16:49.538 [print] {
"resourceType": "Observation",
"id": "21893",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:52.114+02:00",
"source": "#o8hpiOFRxGidyWhh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:16:50.197 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:16:50.823 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:16:53.435+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:16:53.435+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:16:50.824 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:51.856 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:51.856 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pU37gfzHknSLz6r9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21894/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21894/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:51.856 [print] {
"resourceType": "Observation",
"id": "21894",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:55.080+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:16:51.857 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:51.858 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:51.858 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pU37gfzHknSLz6r9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21894/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21894/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:51.858 [print] {
"resourceType": "Observation",
"id": "21894",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:55.080+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:16:51.858 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:16:52.815 [print] {
"resourceType": "Observation",
"id": "21894",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:55.080+02:00",
"source": "#pU37gfzHknSLz6r9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:16:53.432 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:16:54.066 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:16:56.664+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:16:56.664+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:16:54.067 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:54.800 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:54.800 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vB2wPpPN69WmNbbO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21895/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21895/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:54.800 [print] {
"resourceType": "Observation",
"id": "21895",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:58.028+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:16:54.800 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:54.801 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:54.801 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vB2wPpPN69WmNbbO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21895/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:16:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21895/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:16:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:54.801 [print] {
"resourceType": "Observation",
"id": "21895",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:58.028+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:16:54.801 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:16:55.451 [print] {
"resourceType": "Observation",
"id": "21895",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:16:58.028+02:00",
"source": "#vB2wPpPN69WmNbbO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:16:56.114 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 20ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 20ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:16:56.726 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:16:59.337+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:16:59.337+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:16:56.727 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:57.342 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:57.343 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cIROCPYOj1BHrj8y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21896/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21896/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:57.343 [print] {
"resourceType": "Observation",
"id": "21896",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:00.573+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:16:57.343 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:57.344 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:57.344 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cIROCPYOj1BHrj8y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21896/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21896/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:57.344 [print] {
"resourceType": "Observation",
"id": "21896",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:00.573+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:16:57.344 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:16:58.037 [print] {
"resourceType": "Observation",
"id": "21896",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:00.573+02:00",
"source": "#cIROCPYOj1BHrj8y",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:16:58.650 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:16:59.292 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:17:01.891+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:17:01.891+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:16:59.293 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:59.904 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:59.904 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GpcJHjcFJJz1YG54"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21897/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21897/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:59.904 [print] {
"resourceType": "Observation",
"id": "21897",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:03.138+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:16:59.904 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:16:59.905 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:16:59.905 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GpcJHjcFJJz1YG54"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21897/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21897/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:16:59.905 [print] {
"resourceType": "Observation",
"id": "21897",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:03.138+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:16:59.905 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:17:00.516 [print] {
"resourceType": "Observation",
"id": "21897",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:03.138+02:00",
"source": "#GpcJHjcFJJz1YG54",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:17:01.159 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 15ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 15ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:17:01.759 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:17:04.392+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:17:04.392+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:17:01.760 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:02.427 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:02.427 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6FunbKTExJ4zWemY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21898/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21898/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:02.428 [print] {
"resourceType": "Observation",
"id": "21898",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:05.661+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:17:02.428 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:02.429 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:02.429 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6FunbKTExJ4zWemY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21898/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21898/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:02.429 [print] {
"resourceType": "Observation",
"id": "21898",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:05.661+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:17:02.429 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:17:03.028 [print] {
"resourceType": "Observation",
"id": "21898",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:05.661+02:00",
"source": "#6FunbKTExJ4zWemY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:17:03.686 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:17:04.361 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:17:06.924+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:17:06.924+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:17:04.362 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:05.112 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:05.113 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7CGM9ufI1YZBgIYh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21899/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21899/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:05.113 [print] {
"resourceType": "Observation",
"id": "21899",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:08.334+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:17:05.113 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:05.114 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:05.114 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7CGM9ufI1YZBgIYh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21899/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21899/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:05.114 [print] {
"resourceType": "Observation",
"id": "21899",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:08.334+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:17:05.114 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:17:05.773 [print] {
"resourceType": "Observation",
"id": "21899",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:08.334+02:00",
"source": "#7CGM9ufI1YZBgIYh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:17:06.418 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:17:07.019 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:17:09.658+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:17:09.658+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:17:07.021 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:08.297 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:08.297 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NjLAZRg8V6TdjaXn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21900/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21900/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:08.297 [print] {
"resourceType": "Observation",
"id": "21900",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:11.537+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:17:08.297 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:08.298 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:08.298 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NjLAZRg8V6TdjaXn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21900/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21900/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:08.298 [print] {
"resourceType": "Observation",
"id": "21900",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:11.537+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:17:08.298 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:17:08.914 [print] {
"resourceType": "Observation",
"id": "21900",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:11.537+02:00",
"source": "#NjLAZRg8V6TdjaXn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:17:09.536 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:17:10.139 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:17:12.770+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:17:12.770+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:17:10.141 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:10.796 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:10.796 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZEtZrU8GU3kKeyKW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21901/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21901/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:10.797 [print] {
"resourceType": "Observation",
"id": "21901",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:14.023+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:17:10.797 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:10.798 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:10.798 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZEtZrU8GU3kKeyKW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21901/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21901/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:10.798 [print] {
"resourceType": "Observation",
"id": "21901",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:14.023+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:17:10.798 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:17:11.393 [print] {
"resourceType": "Observation",
"id": "21901",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:14.023+02:00",
"source": "#ZEtZrU8GU3kKeyKW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:17:12.010 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:17:12.610 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:17:15.250+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:17:15.250+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:17:12.611 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:13.243 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:13.243 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cpcWCGIbrRLRNZcL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21902/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21902/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:13.243 [print] {
"resourceType": "Observation",
"id": "21902",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:16.467+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:17:13.243 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:13.244 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:13.244 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cpcWCGIbrRLRNZcL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21902/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21902/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:13.244 [print] {
"resourceType": "Observation",
"id": "21902",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:16.467+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:17:13.244 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:17:13.869 [print] {
"resourceType": "Observation",
"id": "21902",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:16.467+02:00",
"source": "#cpcWCGIbrRLRNZcL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:17:14.538 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:17:15.153 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:17:17.774+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:17:17.774+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:17:15.155 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:15.779 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:15.779 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"shhVpiLCdPWZibDs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21903/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21903/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:15.779 [print] {
"resourceType": "Observation",
"id": "21903",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:19.010+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:17:15.779 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:15.780 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:15.780 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"shhVpiLCdPWZibDs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21903/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21903/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:15.780 [print] {
"resourceType": "Observation",
"id": "21903",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:19.010+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:17:15.780 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:17:16.607 [print] {
"resourceType": "Observation",
"id": "21903",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:19.010+02:00",
"source": "#shhVpiLCdPWZibDs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:17:17.224 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:17:17.848 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:17:20.457+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:17:20.457+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:17:17.850 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:18.758 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:18.759 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zMszEngeMYe480zG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21904/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21904/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:18.759 [print] {
"resourceType": "Observation",
"id": "21904",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:21.995+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:17:18.759 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:18.760 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:18.760 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zMszEngeMYe480zG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21904/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21904/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:18.760 [print] {
"resourceType": "Observation",
"id": "21904",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:21.995+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:17:18.760 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:17:19.607 [print] {
"resourceType": "Observation",
"id": "21904",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:21.995+02:00",
"source": "#zMszEngeMYe480zG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:17:20.259 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:17:20.883 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:17:23.486+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:17:23.486+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:17:20.885 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:28.948 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:28.948 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TdXZs85yNj0oDOkR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21905/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21905/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:28.948 [print] {
"resourceType": "Observation",
"id": "21905",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:32.169+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:17:28.949 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:28.950 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:28.950 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TdXZs85yNj0oDOkR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21905/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21905/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:28.950 [print] {
"resourceType": "Observation",
"id": "21905",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:32.169+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:17:28.950 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:17:29.850 [print] {
"resourceType": "Observation",
"id": "21905",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:32.169+02:00",
"source": "#TdXZs85yNj0oDOkR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:17:30.471 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:17:31.291 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:17:33.695+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:17:33.695+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:17:31.293 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:31.902 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:31.902 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pGTmqYEtJP8jMylY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21906/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21906/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:31.903 [print] {
"resourceType": "Observation",
"id": "21906",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:35.136+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:17:31.903 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:31.904 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:31.904 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pGTmqYEtJP8jMylY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21906/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21906/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:31.904 [print] {
"resourceType": "Observation",
"id": "21906",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:35.136+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:17:31.904 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:17:33.534 [print] {
"resourceType": "Observation",
"id": "21906",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:35.136+02:00",
"source": "#pGTmqYEtJP8jMylY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:17:34.649 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:17:35.256 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:17:37.888+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:17:37.888+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:17:35.257 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:35.906 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:35.906 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bBitGUno0Uv8sy0y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21907/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21907/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:35.906 [print] {
"resourceType": "Observation",
"id": "21907",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:39.117+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:17:35.906 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:35.907 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:35.907 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bBitGUno0Uv8sy0y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21907/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21907/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:35.907 [print] {
"resourceType": "Observation",
"id": "21907",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:39.117+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:17:35.907 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:17:36.513 [print] {
"resourceType": "Observation",
"id": "21907",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:39.117+02:00",
"source": "#bBitGUno0Uv8sy0y",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:17:37.170 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:17:38.138 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:17:40.397+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:17:40.397+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:17:38.139 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:38.781 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:38.781 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Js42rGYb05E6w8iG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21908/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21908/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:38.781 [print] {
"resourceType": "Observation",
"id": "21908",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:42.007+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:17:38.781 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:38.782 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:38.782 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Js42rGYb05E6w8iG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21908/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21908/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:38.782 [print] {
"resourceType": "Observation",
"id": "21908",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:42.007+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:17:38.782 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:17:39.387 [print] {
"resourceType": "Observation",
"id": "21908",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:42.007+02:00",
"source": "#Js42rGYb05E6w8iG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:17:40.000 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:17:40.614 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:17:43.236+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:17:43.236+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:17:40.616 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:41.238 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:41.238 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ipRVJDEO2qkrfEwL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21909/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21909/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:41.238 [print] {
"resourceType": "Observation",
"id": "21909",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:44.456+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:17:41.238 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:41.239 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:41.239 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ipRVJDEO2qkrfEwL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21909/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21909/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:41.239 [print] {
"resourceType": "Observation",
"id": "21909",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:44.456+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:17:41.239 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:17:41.844 [print] {
"resourceType": "Observation",
"id": "21909",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:44.456+02:00",
"source": "#ipRVJDEO2qkrfEwL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:17:42.480 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:17:43.437 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:17:45.708+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:17:45.708+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:17:43.439 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:44.069 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:44.070 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"80Ov2iIHjDhIbe3G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21910/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21910/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:44.070 [print] {
"resourceType": "Observation",
"id": "21910",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:47.303+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:17:44.070 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:44.071 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:44.071 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"80Ov2iIHjDhIbe3G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21910/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21910/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:44.071 [print] {
"resourceType": "Observation",
"id": "21910",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:47.303+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:17:44.071 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:17:44.676 [print] {
"resourceType": "Observation",
"id": "21910",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:47.303+02:00",
"source": "#80Ov2iIHjDhIbe3G",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:17:45.393 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:17:46.006 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:17:48.545+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:17:48.545+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:17:46.008 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:46.628 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:46.628 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UuBRZ4WBuOAn84tO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21911/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21911/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:46.628 [print] {
"resourceType": "Observation",
"id": "21911",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:49.854+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:17:46.628 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:46.630 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:46.630 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UuBRZ4WBuOAn84tO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21911/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21911/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:46.630 [print] {
"resourceType": "Observation",
"id": "21911",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:49.854+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:17:46.630 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:17:47.229 [print] {
"resourceType": "Observation",
"id": "21911",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:49.854+02:00",
"source": "#UuBRZ4WBuOAn84tO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:17:47.869 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:17:48.533 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:17:51.107+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:17:51.107+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:17:48.534 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:49.150 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:49.150 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Y8Lc29m3h73WudTR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21912/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21912/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:49.150 [print] {
"resourceType": "Observation",
"id": "21912",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:52.385+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:17:49.150 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:49.151 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:49.151 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Y8Lc29m3h73WudTR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21912/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21912/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:49.151 [print] {
"resourceType": "Observation",
"id": "21912",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:52.385+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:17:49.151 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:17:49.786 [print] {
"resourceType": "Observation",
"id": "21912",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:52.385+02:00",
"source": "#Y8Lc29m3h73WudTR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:17:50.507 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:17:51.173 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:17:53.707+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:17:53.707+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:17:51.174 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:51.815 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:51.815 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wXZK2vVXc391aBlf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21913/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21913/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:51.816 [print] {
"resourceType": "Observation",
"id": "21913",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:55.044+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:17:51.816 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:51.817 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:51.817 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wXZK2vVXc391aBlf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21913/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21913/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:51.817 [print] {
"resourceType": "Observation",
"id": "21913",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:55.044+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:17:51.817 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:17:52.455 [print] {
"resourceType": "Observation",
"id": "21913",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:55.044+02:00",
"source": "#wXZK2vVXc391aBlf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:17:53.089 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:17:53.751 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:17:56.326+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:17:56.326+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:17:53.752 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:54.409 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:54.409 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uRa11ZEBnhNxxiBS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21914/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21914/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:54.409 [print] {
"resourceType": "Observation",
"id": "21914",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:57.644+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:17:54.409 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:54.411 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:54.411 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uRa11ZEBnhNxxiBS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21914/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:17:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21914/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:17:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:54.411 [print] {
"resourceType": "Observation",
"id": "21914",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:57.644+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:17:54.411 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:17:55.017 [print] {
"resourceType": "Observation",
"id": "21914",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:17:57.644+02:00",
"source": "#uRa11ZEBnhNxxiBS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:17:55.637 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:17:56.269 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:17:58.873+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:17:58.873+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:17:56.271 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:56.900 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:56.900 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LsI326xoTvpwFu5a"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21915/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21915/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:56.901 [print] {
"resourceType": "Observation",
"id": "21915",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:00.128+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:17:56.901 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:56.902 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:56.902 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LsI326xoTvpwFu5a"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21915/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21915/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:56.902 [print] {
"resourceType": "Observation",
"id": "21915",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:00.128+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:17:56.902 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:17:57.746 [print] {
"resourceType": "Observation",
"id": "21915",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:00.128+02:00",
"source": "#LsI326xoTvpwFu5a",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:17:58.388 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:17:59.064 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:18:01.619+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:18:01.619+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:17:59.065 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:59.673 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:59.673 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"J4otSSCj8U4I6sic"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21916/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21916/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:59.673 [print] {
"resourceType": "Observation",
"id": "21916",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:02.909+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:17:59.673 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:17:59.675 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:17:59.675 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"J4otSSCj8U4I6sic"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21916/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21916/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:17:59.675 [print] {
"resourceType": "Observation",
"id": "21916",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:02.909+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:17:59.675 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:18:00.663 [print] {
"resourceType": "Observation",
"id": "21916",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:02.909+02:00",
"source": "#J4otSSCj8U4I6sic",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:18:01.477 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:18:02.083 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:18:04.714+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:18:04.714+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:18:02.085 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:02.965 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:02.965 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Kbhcw7CNau5LtTkV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21917/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21917/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:02.965 [print] {
"resourceType": "Observation",
"id": "21917",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:06.189+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:18:02.965 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:02.967 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:02.967 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Kbhcw7CNau5LtTkV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21917/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21917/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:02.967 [print] {
"resourceType": "Observation",
"id": "21917",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:06.189+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:18:02.967 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:18:03.585 [print] {
"resourceType": "Observation",
"id": "21917",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:06.189+02:00",
"source": "#Kbhcw7CNau5LtTkV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:18:04.257 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:18:04.899 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:18:07.489+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:18:07.489+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:18:04.900 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:05.550 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:05.550 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BBgSBmHbPLeRLu5R"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21918/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21918/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:05.550 [print] {
"resourceType": "Observation",
"id": "21918",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:08.769+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:18:05.551 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:05.552 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:05.552 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BBgSBmHbPLeRLu5R"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21918/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21918/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:05.552 [print] {
"resourceType": "Observation",
"id": "21918",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:08.769+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:18:05.552 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:18:06.245 [print] {
"resourceType": "Observation",
"id": "21918",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:08.769+02:00",
"source": "#BBgSBmHbPLeRLu5R",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:18:07.863 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:18:08.522 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:18:11.102+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:18:11.102+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:18:08.523 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:09.151 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:09.152 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1okSEeXmkmQF3cIW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21919/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21919/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:09.152 [print] {
"resourceType": "Observation",
"id": "21919",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:12.379+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:18:09.152 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:09.153 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:09.153 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1okSEeXmkmQF3cIW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21919/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21919/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:09.153 [print] {
"resourceType": "Observation",
"id": "21919",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:12.379+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:18:09.153 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:18:09.764 [print] {
"resourceType": "Observation",
"id": "21919",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:12.379+02:00",
"source": "#1okSEeXmkmQF3cIW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:18:10.418 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:18:11.055 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:18:13.639+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:18:13.639+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:18:11.056 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:11.688 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:11.689 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zNEqRY43cIKHidl1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21920/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21920/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:11.689 [print] {
"resourceType": "Observation",
"id": "21920",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:14.920+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:18:11.689 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:11.690 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:11.690 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zNEqRY43cIKHidl1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21920/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21920/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:11.690 [print] {
"resourceType": "Observation",
"id": "21920",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:14.920+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:18:11.690 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:18:12.301 [print] {
"resourceType": "Observation",
"id": "21920",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:14.920+02:00",
"source": "#zNEqRY43cIKHidl1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:18:12.907 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:18:13.506 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:18:16.145+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:18:16.145+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:18:13.508 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:14.126 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:14.126 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"luVhUL1mbbhPdw54"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21921/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21921/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:14.127 [print] {
"resourceType": "Observation",
"id": "21921",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:17.358+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:18:14.127 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:14.128 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:14.128 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"luVhUL1mbbhPdw54"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21921/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21921/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:14.128 [print] {
"resourceType": "Observation",
"id": "21921",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:17.358+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:18:14.128 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:18:14.743 [print] {
"resourceType": "Observation",
"id": "21921",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:17.358+02:00",
"source": "#luVhUL1mbbhPdw54",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:18:15.368 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:18:15.982 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:18:18.602+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:18:18.602+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:18:15.983 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:16.610 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:16.611 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ydxvasdLHh8UrHAr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21922/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21922/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:16.611 [print] {
"resourceType": "Observation",
"id": "21922",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:19.843+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:18:16.611 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:16.612 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:16.612 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ydxvasdLHh8UrHAr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21922/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21922/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:16.612 [print] {
"resourceType": "Observation",
"id": "21922",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:19.843+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:18:16.612 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:18:17.228 [print] {
"resourceType": "Observation",
"id": "21922",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:19.843+02:00",
"source": "#ydxvasdLHh8UrHAr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:18:17.833 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:18:18.432 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:18:21.074+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:18:21.074+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:18:18.434 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:19.071 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:19.071 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LYZ1egmV11S2FHF8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21923/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21923/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:19.071 [print] {
"resourceType": "Observation",
"id": "21923",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:22.300+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:18:19.071 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:19.073 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:19.073 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LYZ1egmV11S2FHF8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21923/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21923/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:19.073 [print] {
"resourceType": "Observation",
"id": "21923",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:22.300+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:18:19.073 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:18:19.746 [print] {
"resourceType": "Observation",
"id": "21923",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:22.300+02:00",
"source": "#LYZ1egmV11S2FHF8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:18:20.375 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:18:20.997 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:18:23.605+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:18:23.605+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:18:20.999 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:21.630 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:21.630 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WMQ0AQoHgiDHD3bC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21924/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21924/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:21.630 [print] {
"resourceType": "Observation",
"id": "21924",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:24.861+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:18:21.630 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:21.631 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:21.631 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WMQ0AQoHgiDHD3bC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21924/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21924/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:21.631 [print] {
"resourceType": "Observation",
"id": "21924",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:24.861+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:18:21.631 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:18:22.234 [print] {
"resourceType": "Observation",
"id": "21924",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:24.861+02:00",
"source": "#WMQ0AQoHgiDHD3bC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:18:22.895 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:18:23.495 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:18:26.134+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:18:26.134+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:18:23.495 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:24.212 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:24.212 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"e4viCILDKwP7UlrG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21925/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21925/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:24.212 [print] {
"resourceType": "Observation",
"id": "21925",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:27.424+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:18:24.212 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:24.214 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:24.214 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"e4viCILDKwP7UlrG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21925/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21925/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:24.214 [print] {
"resourceType": "Observation",
"id": "21925",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:27.424+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:18:24.214 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:18:24.861 [print] {
"resourceType": "Observation",
"id": "21925",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:27.424+02:00",
"source": "#e4viCILDKwP7UlrG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:18:25.496 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:18:26.144 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:18:28.728+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:18:28.728+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:18:26.146 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:26.776 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:26.776 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EY6Vef9uJ8RMT7ep"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21926/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21926/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:26.776 [print] {
"resourceType": "Observation",
"id": "21926",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:30.015+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:18:26.776 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:26.777 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:26.777 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EY6Vef9uJ8RMT7ep"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21926/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21926/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:26.777 [print] {
"resourceType": "Observation",
"id": "21926",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:30.015+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:18:26.777 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:18:27.374 [print] {
"resourceType": "Observation",
"id": "21926",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:30.015+02:00",
"source": "#EY6Vef9uJ8RMT7ep",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:18:27.990 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:18:28.600 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:18:31.220+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:18:31.220+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:18:28.601 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:29.242 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:29.243 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jGgS2UqRBkjOXpyz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21927/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21927/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:29.243 [print] {
"resourceType": "Observation",
"id": "21927",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:32.471+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:18:29.243 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:29.245 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:29.245 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jGgS2UqRBkjOXpyz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21927/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21927/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:29.245 [print] {
"resourceType": "Observation",
"id": "21927",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:32.471+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:18:29.245 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:18:29.906 [print] {
"resourceType": "Observation",
"id": "21927",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:32.471+02:00",
"source": "#jGgS2UqRBkjOXpyz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:18:30.597 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:18:31.214 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:18:33.832+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:18:33.832+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:18:31.215 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:32.106 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:32.106 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UqWGnXRzQBga0eck"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21928/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21928/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:32.107 [print] {
"resourceType": "Observation",
"id": "21928",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:35.339+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:18:32.107 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:32.108 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:32.108 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UqWGnXRzQBga0eck"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21928/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21928/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:32.108 [print] {
"resourceType": "Observation",
"id": "21928",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:35.339+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:18:32.108 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:18:32.695 [print] {
"resourceType": "Observation",
"id": "21928",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:35.339+02:00",
"source": "#UqWGnXRzQBga0eck",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:18:33.537 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:18:34.151 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:18:36.777+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:18:36.777+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:18:34.152 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:34.775 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:34.775 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oQd0u1dP6FMzrDlr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21929/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21929/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:34.775 [print] {
"resourceType": "Observation",
"id": "21929",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:38.005+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:18:34.775 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:34.776 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:34.776 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oQd0u1dP6FMzrDlr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21929/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21929/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:34.776 [print] {
"resourceType": "Observation",
"id": "21929",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:38.005+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:18:34.776 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:18:35.427 [print] {
"resourceType": "Observation",
"id": "21929",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:38.005+02:00",
"source": "#oQd0u1dP6FMzrDlr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:18:36.141 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:18:36.727 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:18:39.365+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:18:39.365+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:18:36.728 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:37.370 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:37.370 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XSQiaNuHG5ybohIo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21930/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21930/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:37.370 [print] {
"resourceType": "Observation",
"id": "21930",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:40.602+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:18:37.370 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:37.371 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:37.371 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XSQiaNuHG5ybohIo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21930/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21930/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:37.371 [print] {
"resourceType": "Observation",
"id": "21930",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:40.602+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:18:37.371 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:18:37.985 [print] {
"resourceType": "Observation",
"id": "21930",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:40.602+02:00",
"source": "#XSQiaNuHG5ybohIo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:18:38.811 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:18:39.428 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:18:42.047+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:18:42.047+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:18:39.429 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:40.053 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:40.053 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FqX9Is4Tt8TW8kim"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21931/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21931/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:40.053 [print] {
"resourceType": "Observation",
"id": "21931",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:43.278+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:18:40.053 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:40.055 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:40.055 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FqX9Is4Tt8TW8kim"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21931/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21931/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:40.055 [print] {
"resourceType": "Observation",
"id": "21931",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:43.278+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:18:40.055 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:18:40.687 [print] {
"resourceType": "Observation",
"id": "21931",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:43.278+02:00",
"source": "#FqX9Is4Tt8TW8kim",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:18:41.310 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:18:41.906 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:18:44.546+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:18:44.546+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:18:41.907 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:42.535 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:42.535 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bgOqcpRSovP6N5hi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21932/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21932/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:42.535 [print] {
"resourceType": "Observation",
"id": "21932",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:45.773+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:18:42.535 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:42.536 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:42.536 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bgOqcpRSovP6N5hi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21932/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21932/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:42.536 [print] {
"resourceType": "Observation",
"id": "21932",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:45.773+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:18:42.536 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:18:43.143 [print] {
"resourceType": "Observation",
"id": "21932",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:45.773+02:00",
"source": "#bgOqcpRSovP6N5hi",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:18:43.753 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:18:44.368 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:18:46.994+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:18:46.994+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:18:44.370 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:44.989 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:44.989 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iq6X1wGzXAJMVtp2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21933/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21933/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:44.990 [print] {
"resourceType": "Observation",
"id": "21933",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:48.218+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:18:44.990 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:44.991 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:44.991 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iq6X1wGzXAJMVtp2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21933/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21933/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:44.991 [print] {
"resourceType": "Observation",
"id": "21933",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:48.218+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:18:44.991 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:18:45.642 [print] {
"resourceType": "Observation",
"id": "21933",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:48.218+02:00",
"source": "#iq6X1wGzXAJMVtp2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:18:46.263 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:18:46.896 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:18:49.503+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:18:49.503+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:18:46.897 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:47.545 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:47.545 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Tw15eMAuTNSRLKAF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21934/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21934/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:47.545 [print] {
"resourceType": "Observation",
"id": "21934",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:50.782+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:18:47.545 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:47.547 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:47.547 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Tw15eMAuTNSRLKAF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21934/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21934/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:47.547 [print] {
"resourceType": "Observation",
"id": "21934",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:50.782+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:18:47.547 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:18:48.153 [print] {
"resourceType": "Observation",
"id": "21934",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:50.782+02:00",
"source": "#Tw15eMAuTNSRLKAF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:18:48.766 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:18:49.431 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:18:52.003+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:18:52.003+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:18:49.432 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:50.073 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:50.073 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BUWSMGNHaqw45Oas"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21935/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21935/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:50.074 [print] {
"resourceType": "Observation",
"id": "21935",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:53.290+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:18:50.074 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:50.075 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:50.075 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BUWSMGNHaqw45Oas"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21935/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21935/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:50.075 [print] {
"resourceType": "Observation",
"id": "21935",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:53.290+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:18:50.075 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:18:50.706 [print] {
"resourceType": "Observation",
"id": "21935",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:53.290+02:00",
"source": "#BUWSMGNHaqw45Oas",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:18:51.372 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:18:52.015 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:18:54.602+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:18:54.602+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:18:52.016 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:52.629 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:52.629 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xvL21yZ7O23YGMrT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21936/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21936/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:52.629 [print] {
"resourceType": "Observation",
"id": "21936",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:55.865+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:18:52.629 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:52.630 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:52.630 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xvL21yZ7O23YGMrT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21936/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21936/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:52.630 [print] {
"resourceType": "Observation",
"id": "21936",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:55.865+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:18:52.630 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:18:53.237 [print] {
"resourceType": "Observation",
"id": "21936",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:55.865+02:00",
"source": "#xvL21yZ7O23YGMrT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:18:53.856 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:18:54.473 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:18:57.090+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:18:57.090+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:18:54.474 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:55.091 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"981"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:55.091 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OSTEJM6VQZiRk3J8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21937/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21937/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:55.091 [print] {
"resourceType": "Observation",
"id": "21937",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:58.315+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:18:55.091 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:55.092 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"981"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:55.092 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OSTEJM6VQZiRk3J8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21937/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:18:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21937/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:18:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:55.092 [print] {
"resourceType": "Observation",
"id": "21937",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:58.315+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:18:55.092 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:18:55.728 [print] {
"resourceType": "Observation",
"id": "21937",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:18:58.315+02:00",
"source": "#OSTEJM6VQZiRk3J8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:18:56.386 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:18:57.005 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:18:59.625+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:18:59.625+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:18:57.007 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:57.655 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:57.655 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"I4alyq5eGVqHz8Nc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21938/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21938/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:57.655 [print] {
"resourceType": "Observation",
"id": "21938",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:00.878+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:18:57.655 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:18:57.657 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:18:57.657 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"I4alyq5eGVqHz8Nc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21938/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21938/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:18:57.657 [print] {
"resourceType": "Observation",
"id": "21938",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:00.878+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:18:57.657 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:18:58.627 [print] {
"resourceType": "Observation",
"id": "21938",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:00.878+02:00",
"source": "#I4alyq5eGVqHz8Nc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:18:59.729 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:19:00.352 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:19:02.964+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:19:02.964+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:19:00.353 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:01.002 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"981"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:01.002 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hr6VGVQewU81iRLe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21939/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21939/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:01.002 [print] {
"resourceType": "Observation",
"id": "21939",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:04.212+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:19:01.002 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:01.004 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"981"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:01.004 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hr6VGVQewU81iRLe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21939/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21939/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:01.004 [print] {
"resourceType": "Observation",
"id": "21939",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:04.212+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:19:01.004 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:19:01.922 [print] {
"resourceType": "Observation",
"id": "21939",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:04.212+02:00",
"source": "#hr6VGVQewU81iRLe",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:19:02.566 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 13ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 13ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:19:03.244 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:19:05.788+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:19:05.788+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:19:03.245 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:03.865 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:03.865 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"G7UDklsCTFuvDv7O"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21940/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21940/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:03.865 [print] {
"resourceType": "Observation",
"id": "21940",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:07.081+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:19:03.865 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:03.867 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:03.867 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"G7UDklsCTFuvDv7O"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21940/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21940/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:03.867 [print] {
"resourceType": "Observation",
"id": "21940",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:07.081+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:19:03.867 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:19:04.765 [print] {
"resourceType": "Observation",
"id": "21940",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:07.081+02:00",
"source": "#G7UDklsCTFuvDv7O",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:19:05.432 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:19:06.334 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:19:08.671+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:19:08.671+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:19:06.336 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:06.985 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"981"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:06.985 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3Hw82bzUi655h3Dg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21941/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21941/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:06.985 [print] {
"resourceType": "Observation",
"id": "21941",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:10.198+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:19:06.985 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:06.986 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"981"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:06.986 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3Hw82bzUi655h3Dg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21941/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21941/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:06.986 [print] {
"resourceType": "Observation",
"id": "21941",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:10.198+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:19:06.986 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:19:07.608 [print] {
"resourceType": "Observation",
"id": "21941",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:10.198+02:00",
"source": "#3Hw82bzUi655h3Dg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:19:08.283 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:19:08.903 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:19:11.508+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:19:11.508+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:19:08.905 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:09.549 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:09.549 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BzbfgLGrhKvisLVQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21942/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21942/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:09.549 [print] {
"resourceType": "Observation",
"id": "21942",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:12.777+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:19:09.549 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:09.550 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:09.550 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BzbfgLGrhKvisLVQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21942/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21942/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:09.550 [print] {
"resourceType": "Observation",
"id": "21942",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:12.777+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:19:09.550 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:19:10.166 [print] {
"resourceType": "Observation",
"id": "21942",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:12.777+02:00",
"source": "#BzbfgLGrhKvisLVQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:19:10.803 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:19:11.402 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:19:14.035+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:19:14.035+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:19:11.403 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:12.036 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:12.036 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ASW8xs5Zkoo7MgH8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21943/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21943/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:12.036 [print] {
"resourceType": "Observation",
"id": "21943",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:15.268+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:19:12.036 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:12.037 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:12.037 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ASW8xs5Zkoo7MgH8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21943/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21943/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:12.037 [print] {
"resourceType": "Observation",
"id": "21943",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:15.268+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:19:12.037 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:19:12.660 [print] {
"resourceType": "Observation",
"id": "21943",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:15.268+02:00",
"source": "#ASW8xs5Zkoo7MgH8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:19:13.302 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:19:13.926 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:19:16.515+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:19:16.515+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:19:13.928 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:14.763 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:14.763 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"t67XPbaxn2L98ewi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21944/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21944/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:14.763 [print] {
"resourceType": "Observation",
"id": "21944",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:17.784+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:19:14.763 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:14.764 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:14.764 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"t67XPbaxn2L98ewi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21944/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21944/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:14.764 [print] {
"resourceType": "Observation",
"id": "21944",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:17.784+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:19:14.764 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:19:15.407 [print] {
"resourceType": "Observation",
"id": "21944",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:17.784+02:00",
"source": "#t67XPbaxn2L98ewi",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:19:16.041 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:19:16.652 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:19:19.277+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:19:19.277+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:19:16.653 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:17.292 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:17.292 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oOTTVosEkDx2Zty3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21945/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21945/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:17.293 [print] {
"resourceType": "Observation",
"id": "21945",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:20.522+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:19:17.293 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:17.294 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:17.294 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oOTTVosEkDx2Zty3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21945/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21945/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:17.294 [print] {
"resourceType": "Observation",
"id": "21945",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:20.522+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:19:17.294 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:19:17.896 [print] {
"resourceType": "Observation",
"id": "21945",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:20.522+02:00",
"source": "#oOTTVosEkDx2Zty3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:19:18.508 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:19:19.107 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:19:21.746+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:19:21.746+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:19:19.108 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:19.745 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:19.745 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9YABoYq3je5SXFwu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21946/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21946/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:19.745 [print] {
"resourceType": "Observation",
"id": "21946",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:22.974+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:19:19.745 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:19.746 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:19.746 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9YABoYq3je5SXFwu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21946/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21946/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:19.746 [print] {
"resourceType": "Observation",
"id": "21946",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:22.974+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:19:19.746 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:19:20.354 [print] {
"resourceType": "Observation",
"id": "21946",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:22.974+02:00",
"source": "#9YABoYq3je5SXFwu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:19:21.289 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:19:21.899 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:19:24.517+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:19:24.517+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:19:21.900 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:22.564 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:22.564 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cagEdAMUNfLbdw5P"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21947/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21947/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:22.564 [print] {
"resourceType": "Observation",
"id": "21947",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:25.763+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:19:22.564 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:22.565 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:22.565 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cagEdAMUNfLbdw5P"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21947/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21947/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:22.565 [print] {
"resourceType": "Observation",
"id": "21947",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:25.763+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:19:22.565 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:19:23.169 [print] {
"resourceType": "Observation",
"id": "21947",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:25.763+02:00",
"source": "#cagEdAMUNfLbdw5P",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:19:23.821 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:19:24.465 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:19:27.030+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:19:27.030+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:19:24.466 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:25.102 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:25.102 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lbXttj5g4euhU9dD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21948/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21948/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:25.102 [print] {
"resourceType": "Observation",
"id": "21948",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:28.321+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:19:25.102 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:25.104 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:25.104 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lbXttj5g4euhU9dD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21948/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21948/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:25.104 [print] {
"resourceType": "Observation",
"id": "21948",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:28.321+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:19:25.104 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:19:25.716 [print] {
"resourceType": "Observation",
"id": "21948",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:28.321+02:00",
"source": "#lbXttj5g4euhU9dD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:19:26.363 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:19:26.971 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:19:29.600+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:19:29.600+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:19:26.972 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:27.598 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:27.598 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YjiyhrFhdGo9mLQb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21949/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21949/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:27.598 [print] {
"resourceType": "Observation",
"id": "21949",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:30.812+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:19:27.598 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:27.599 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:27.599 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YjiyhrFhdGo9mLQb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21949/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21949/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:27.599 [print] {
"resourceType": "Observation",
"id": "21949",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:30.812+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:19:27.599 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:19:28.213 [print] {
"resourceType": "Observation",
"id": "21949",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:30.812+02:00",
"source": "#YjiyhrFhdGo9mLQb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:19:28.848 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:19:29.451 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:19:32.070+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:19:32.070+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:19:29.452 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:30.105 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:30.105 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yK5IX82oyCn5Di0r"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21950/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21950/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:30.105 [print] {
"resourceType": "Observation",
"id": "21950",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:33.319+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:19:30.105 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:30.111 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:30.111 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yK5IX82oyCn5Di0r"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21950/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21950/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:30.111 [print] {
"resourceType": "Observation",
"id": "21950",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:33.319+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:19:30.111 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:19:30.947 [print] {
"resourceType": "Observation",
"id": "21950",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:33.319+02:00",
"source": "#yK5IX82oyCn5Di0r",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:19:31.564 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:19:32.211 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:19:34.798+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:19:34.798+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:19:32.213 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:34.083 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:34.083 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9iPMqBXUpOkY9Rle"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21951/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21951/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:34.083 [print] {
"resourceType": "Observation",
"id": "21951",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:37.290+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:19:34.083 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:34.085 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:34.085 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9iPMqBXUpOkY9Rle"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21951/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21951/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:34.085 [print] {
"resourceType": "Observation",
"id": "21951",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:37.290+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:19:34.085 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:19:34.699 [print] {
"resourceType": "Observation",
"id": "21951",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:37.290+02:00",
"source": "#9iPMqBXUpOkY9Rle",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:19:35.328 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:19:35.980 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:19:38.554+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:19:38.554+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:19:35.982 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:36.845 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:36.845 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TGENiNLoC2vYqKRA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21952/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21952/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:36.845 [print] {
"resourceType": "Observation",
"id": "21952",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:40.077+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:19:36.845 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:36.847 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:36.847 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TGENiNLoC2vYqKRA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21952/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21952/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:36.847 [print] {
"resourceType": "Observation",
"id": "21952",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:40.077+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:19:36.847 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:19:37.475 [print] {
"resourceType": "Observation",
"id": "21952",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:40.077+02:00",
"source": "#TGENiNLoC2vYqKRA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:19:38.060 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:19:38.683 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:19:41.296+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:19:41.296+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:19:38.685 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:39.315 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:39.315 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PKYt4paeULcXNBum"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21953/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21953/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:39.315 [print] {
"resourceType": "Observation",
"id": "21953",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:42.538+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:19:39.315 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:39.316 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:39.317 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PKYt4paeULcXNBum"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21953/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21953/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:39.317 [print] {
"resourceType": "Observation",
"id": "21953",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:42.538+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:19:39.317 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:19:39.948 [print] {
"resourceType": "Observation",
"id": "21953",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:42.538+02:00",
"source": "#PKYt4paeULcXNBum",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:19:40.551 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:19:41.187 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:19:43.786+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:19:43.786+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:19:41.188 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:41.827 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:41.827 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"t9xo9BrqMgTAPMjR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21954/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21954/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:41.827 [print] {
"resourceType": "Observation",
"id": "21954",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:45.064+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:19:41.827 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:41.828 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:41.828 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"t9xo9BrqMgTAPMjR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21954/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21954/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:41.828 [print] {
"resourceType": "Observation",
"id": "21954",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:45.064+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:19:41.828 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:19:42.427 [print] {
"resourceType": "Observation",
"id": "21954",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:45.064+02:00",
"source": "#t9xo9BrqMgTAPMjR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:19:43.044 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:19:44.023 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:19:46.268+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:19:46.268+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:19:44.025 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:44.677 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:44.677 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rNsnnBhnrOXlxtbM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21955/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21955/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:44.677 [print] {
"resourceType": "Observation",
"id": "21955",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:47.908+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:19:44.677 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:44.678 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:44.678 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rNsnnBhnrOXlxtbM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21955/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21955/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:44.678 [print] {
"resourceType": "Observation",
"id": "21955",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:47.908+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:19:44.678 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:19:45.301 [print] {
"resourceType": "Observation",
"id": "21955",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:47.908+02:00",
"source": "#rNsnnBhnrOXlxtbM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:19:46.935 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:19:47.540 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:19:50.170+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:19:50.170+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:19:47.540 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:48.146 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:48.146 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bbSHqqBIyErucDgv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21956/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21956/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:48.146 [print] {
"resourceType": "Observation",
"id": "21956",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:51.377+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:19:48.146 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:48.147 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:48.148 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bbSHqqBIyErucDgv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21956/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21956/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:48.148 [print] {
"resourceType": "Observation",
"id": "21956",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:51.377+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:19:48.148 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:19:48.760 [print] {
"resourceType": "Observation",
"id": "21956",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:51.377+02:00",
"source": "#bbSHqqBIyErucDgv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:19:49.383 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:19:49.993 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:19:52.618+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:19:52.618+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:19:49.994 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:50.627 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:50.627 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CWGsuLKM2r3Yi0JQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21957/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21957/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:50.628 [print] {
"resourceType": "Observation",
"id": "21957",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:53.845+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:19:50.628 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:50.629 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:50.629 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CWGsuLKM2r3Yi0JQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21957/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21957/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:50.629 [print] {
"resourceType": "Observation",
"id": "21957",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:53.845+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:19:50.629 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:19:51.337 [print] {
"resourceType": "Observation",
"id": "21957",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:53.845+02:00",
"source": "#CWGsuLKM2r3Yi0JQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:19:51.946 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:19:52.549 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:19:55.186+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:19:55.186+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:19:52.550 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:53.173 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:53.173 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CL05WC74tiVvHv3a"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21958/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21958/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:53.173 [print] {
"resourceType": "Observation",
"id": "21958",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:56.400+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:19:53.174 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:53.175 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:53.175 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CL05WC74tiVvHv3a"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21958/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21958/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:53.175 [print] {
"resourceType": "Observation",
"id": "21958",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:56.400+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:19:53.175 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:19:53.787 [print] {
"resourceType": "Observation",
"id": "21958",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:56.400+02:00",
"source": "#CL05WC74tiVvHv3a",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:19:54.406 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:19:55.030 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:19:57.643+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:19:57.643+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:19:55.032 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:56.187 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:56.187 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bQNtojfw948sWUnT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21959/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21959/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:56.187 [print] {
"resourceType": "Observation",
"id": "21959",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:59.403+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:19:56.188 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:56.189 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:56.189 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bQNtojfw948sWUnT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21959/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:19:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21959/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:19:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:56.189 [print] {
"resourceType": "Observation",
"id": "21959",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:59.403+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:19:56.189 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:19:56.793 [print] {
"resourceType": "Observation",
"id": "21959",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:19:59.403+02:00",
"source": "#bQNtojfw948sWUnT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:19:57.436 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:19:59.065 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:20:00.670+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:20:00.670+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:19:59.066 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:59.724 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:59.724 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZCSIIVcOohPx4Qma"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21960/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21960/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:59.725 [print] {
"resourceType": "Observation",
"id": "21960",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:02.958+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:19:59.725 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:19:59.726 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:19:59.726 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZCSIIVcOohPx4Qma"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21960/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21960/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:19:59.726 [print] {
"resourceType": "Observation",
"id": "21960",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:02.958+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:19:59.726 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:20:00.351 [print] {
"resourceType": "Observation",
"id": "21960",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:02.958+02:00",
"source": "#ZCSIIVcOohPx4Qma",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:20:01.081 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:20:01.706 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:20:04.274+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:20:04.274+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:20:01.707 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:02.357 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:02.357 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"obM0asWQ4WKD4qmd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21961/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21961/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:02.357 [print] {
"resourceType": "Observation",
"id": "21961",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:05.569+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:20:02.357 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:02.358 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:02.358 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"obM0asWQ4WKD4qmd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21961/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21961/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:02.359 [print] {
"resourceType": "Observation",
"id": "21961",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:05.569+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:20:02.359 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:20:02.965 [print] {
"resourceType": "Observation",
"id": "21961",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:05.569+02:00",
"source": "#obM0asWQ4WKD4qmd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:20:03.580 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:20:04.207 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:20:06.816+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:20:06.816+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:20:04.209 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:04.862 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:04.863 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gkksgZBJAn1YMZkv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21962/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21962/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:04.863 [print] {
"resourceType": "Observation",
"id": "21962",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:08.078+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:20:04.863 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:04.864 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:04.865 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gkksgZBJAn1YMZkv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21962/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21962/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:04.865 [print] {
"resourceType": "Observation",
"id": "21962",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:08.078+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:20:04.865 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:20:05.483 [print] {
"resourceType": "Observation",
"id": "21962",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:08.078+02:00",
"source": "#gkksgZBJAn1YMZkv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:20:06.096 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:20:06.702 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:20:09.335+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:20:09.335+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:20:06.703 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:08.299 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"981"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:08.299 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SBHfXHBa7V6n8Ft3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21963/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21963/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:08.299 [print] {
"resourceType": "Observation",
"id": "21963",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:11.527+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:20:08.300 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:08.301 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"981"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:08.301 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SBHfXHBa7V6n8Ft3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21963/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21963/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:08.301 [print] {
"resourceType": "Observation",
"id": "21963",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:11.527+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:20:08.301 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:20:08.959 [print] {
"resourceType": "Observation",
"id": "21963",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:11.527+02:00",
"source": "#SBHfXHBa7V6n8Ft3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:20:09.610 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:20:10.273 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:20:12.845+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:20:12.845+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:20:10.274 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:10.906 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:10.906 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5eDyBFj5RTLnTthI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21964/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21964/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:10.907 [print] {
"resourceType": "Observation",
"id": "21964",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:14.123+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:20:10.907 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:10.908 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:10.908 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5eDyBFj5RTLnTthI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21964/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21964/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:10.908 [print] {
"resourceType": "Observation",
"id": "21964",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:14.123+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:20:10.908 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:20:11.509 [print] {
"resourceType": "Observation",
"id": "21964",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:14.123+02:00",
"source": "#5eDyBFj5RTLnTthI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:20:12.161 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:20:12.783 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:20:15.390+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:20:15.390+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:20:12.784 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:13.632 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"981"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:13.632 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"i1diAYaTXlUIqh5G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21965/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21965/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:13.632 [print] {
"resourceType": "Observation",
"id": "21965",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:16.637+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:20:13.632 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:13.633 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"981"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:13.633 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"i1diAYaTXlUIqh5G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21965/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21965/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:13.634 [print] {
"resourceType": "Observation",
"id": "21965",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:16.637+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:20:13.634 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:20:14.450 [print] {
"resourceType": "Observation",
"id": "21965",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:16.637+02:00",
"source": "#i1diAYaTXlUIqh5G",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:20:15.074 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:20:15.692 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:20:18.307+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:20:18.307+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:20:15.693 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:17.819 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:17.819 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qtRBnjBo4N6m85MG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21966/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21966/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:17.819 [print] {
"resourceType": "Observation",
"id": "21966",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:21.051+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:20:17.820 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:17.821 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:17.821 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qtRBnjBo4N6m85MG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21966/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21966/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:17.821 [print] {
"resourceType": "Observation",
"id": "21966",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:21.051+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:20:17.821 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:20:18.439 [print] {
"resourceType": "Observation",
"id": "21966",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:21.051+02:00",
"source": "#qtRBnjBo4N6m85MG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:20:20.305 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:20:20.949 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:20:23.536+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:20:23.536+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:20:20.950 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:21.633 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"981"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:21.633 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"r4P3VWebwOuDdCF0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21967/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21967/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:21.633 [print] {
"resourceType": "Observation",
"id": "21967",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:24.841+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:20:21.633 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:21.634 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"981"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:21.634 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"r4P3VWebwOuDdCF0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21967/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21967/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:21.634 [print] {
"resourceType": "Observation",
"id": "21967",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:24.841+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:20:21.634 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:20:23.748 [print] {
"resourceType": "Observation",
"id": "21967",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:24.841+02:00",
"source": "#r4P3VWebwOuDdCF0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:20:24.370 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:20:24.967 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:20:27.601+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:20:27.601+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:20:24.969 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:25.603 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:25.603 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RAFHLp26yBmMwJC9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21968/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21968/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:25.603 [print] {
"resourceType": "Observation",
"id": "21968",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:28.836+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:20:25.603 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:25.604 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:25.604 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RAFHLp26yBmMwJC9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21968/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21968/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:25.604 [print] {
"resourceType": "Observation",
"id": "21968",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:28.836+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:20:25.605 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:20:26.208 [print] {
"resourceType": "Observation",
"id": "21968",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:28.836+02:00",
"source": "#RAFHLp26yBmMwJC9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:20:26.834 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:20:28.444 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:20:30.058+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:20:30.058+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:20:28.445 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:29.076 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:29.076 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"H6UuCkDZPUKFdGsH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21969/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21969/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:29.076 [print] {
"resourceType": "Observation",
"id": "21969",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:32.293+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:20:29.076 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:29.078 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:29.078 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"H6UuCkDZPUKFdGsH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21969/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21969/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:29.078 [print] {
"resourceType": "Observation",
"id": "21969",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:32.293+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:20:29.078 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:20:30.716 [print] {
"resourceType": "Observation",
"id": "21969",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:32.293+02:00",
"source": "#H6UuCkDZPUKFdGsH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:20:31.352 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:20:31.988 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:20:34.580+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:20:34.580+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:20:31.989 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:33.312 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:33.312 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KvQnroiPOlJuKPym"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21970/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21970/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:33.312 [print] {
"resourceType": "Observation",
"id": "21970",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:36.530+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:20:33.312 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:33.313 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:33.313 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KvQnroiPOlJuKPym"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21970/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21970/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:33.313 [print] {
"resourceType": "Observation",
"id": "21970",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:36.530+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:20:33.313 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:20:33.916 [print] {
"resourceType": "Observation",
"id": "21970",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:36.530+02:00",
"source": "#KvQnroiPOlJuKPym",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:20:34.572 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:20:35.191 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:20:37.802+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:20:37.802+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:20:35.193 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:35.824 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:35.825 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2JZfOLwnoUc40oK7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21971/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21971/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:35.825 [print] {
"resourceType": "Observation",
"id": "21971",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:39.051+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:20:35.825 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:35.826 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:35.827 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2JZfOLwnoUc40oK7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21971/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21971/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:35.827 [print] {
"resourceType": "Observation",
"id": "21971",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:39.051+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:20:35.827 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:20:36.473 [print] {
"resourceType": "Observation",
"id": "21971",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:39.051+02:00",
"source": "#2JZfOLwnoUc40oK7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:20:37.114 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:20:37.731 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:20:40.349+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:20:40.349+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:20:37.732 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:38.943 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:38.944 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jrxgHH39fIonHEx4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21972/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21972/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:38.944 [print] {
"resourceType": "Observation",
"id": "21972",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:42.173+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:20:38.944 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:38.945 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:38.945 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jrxgHH39fIonHEx4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21972/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21972/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:38.945 [print] {
"resourceType": "Observation",
"id": "21972",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:42.173+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:20:38.945 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:20:39.975 [print] {
"resourceType": "Observation",
"id": "21972",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:42.173+02:00",
"source": "#jrxgHH39fIonHEx4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:20:40.625 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:20:41.239 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:20:43.865+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:20:43.865+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:20:41.241 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:41.848 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:41.848 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SDeNgWFk5bTWCvfv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21973/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21973/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:41.848 [print] {
"resourceType": "Observation",
"id": "21973",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:45.075+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:20:41.848 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:41.849 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:41.849 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SDeNgWFk5bTWCvfv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21973/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21973/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:41.849 [print] {
"resourceType": "Observation",
"id": "21973",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:45.075+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:20:41.849 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:20:42.457 [print] {
"resourceType": "Observation",
"id": "21973",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:45.075+02:00",
"source": "#SDeNgWFk5bTWCvfv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:20:43.083 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:20:43.711 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:20:46.318+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:20:46.318+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:20:43.712 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:44.329 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:44.329 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VA5AVVB7ZnFD4HDU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21974/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21974/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:44.329 [print] {
"resourceType": "Observation",
"id": "21974",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:47.566+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:20:44.329 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:44.331 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:44.331 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VA5AVVB7ZnFD4HDU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21974/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21974/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:44.331 [print] {
"resourceType": "Observation",
"id": "21974",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:47.566+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:20:44.331 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:20:45.232 [print] {
"resourceType": "Observation",
"id": "21974",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:47.566+02:00",
"source": "#VA5AVVB7ZnFD4HDU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:20:45.848 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:20:47.003 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:20:49.081+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:20:49.081+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:20:47.004 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:47.649 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:47.649 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0egmIf6khoBBcFuC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21975/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21975/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:47.649 [print] {
"resourceType": "Observation",
"id": "21975",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:50.880+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:20:47.649 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:47.650 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:47.650 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0egmIf6khoBBcFuC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21975/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21975/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:47.650 [print] {
"resourceType": "Observation",
"id": "21975",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:50.880+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:20:47.650 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:20:48.296 [print] {
"resourceType": "Observation",
"id": "21975",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:50.880+02:00",
"source": "#0egmIf6khoBBcFuC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:20:48.947 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:20:49.580 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:20:52.172+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:20:52.172+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:20:49.582 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:50.522 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:50.522 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IzKTOJ79GQXhG4BR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21976/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21976/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:50.522 [print] {
"resourceType": "Observation",
"id": "21976",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:53.738+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:20:50.522 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:50.524 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:50.524 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IzKTOJ79GQXhG4BR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21976/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21976/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:50.524 [print] {
"resourceType": "Observation",
"id": "21976",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:53.738+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:20:50.524 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:20:52.416 [print] {
"resourceType": "Observation",
"id": "21976",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:53.738+02:00",
"source": "#IzKTOJ79GQXhG4BR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:20:53.046 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:20:53.673 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:20:56.285+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:20:56.285+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:20:53.675 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:54.762 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:54.762 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"L5tylM39k5WBaPrq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21977/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21977/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:54.762 [print] {
"resourceType": "Observation",
"id": "21977",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:57.954+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:20:54.762 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:54.764 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:54.764 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"L5tylM39k5WBaPrq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21977/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:20:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21977/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:20:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:54.764 [print] {
"resourceType": "Observation",
"id": "21977",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:57.954+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:20:54.764 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:20:55.421 [print] {
"resourceType": "Observation",
"id": "21977",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:20:57.954+02:00",
"source": "#L5tylM39k5WBaPrq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:20:57.489 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:20:58.139 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:21:00.710+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:21:00.710+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:20:58.141 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:59.823 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:59.824 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MD7FlaLd4CpkQwjn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21978/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21978/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:59.824 [print] {
"resourceType": "Observation",
"id": "21978",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:03.058+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:20:59.824 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:20:59.825 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:20:59.825 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MD7FlaLd4CpkQwjn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21978/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21978/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:20:59.825 [print] {
"resourceType": "Observation",
"id": "21978",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:03.058+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:20:59.825 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:21:00.439 [print] {
"resourceType": "Observation",
"id": "21978",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:03.058+02:00",
"source": "#MD7FlaLd4CpkQwjn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:21:01.260 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:21:03.148 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:21:04.495+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:21:04.495+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:21:03.150 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:04.994 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:04.994 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"b7xIxyWtkDQVqG1a"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21979/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21979/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:04.994 [print] {
"resourceType": "Observation",
"id": "21979",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:08.003+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:21:04.994 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:04.995 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:04.995 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"b7xIxyWtkDQVqG1a"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21979/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21979/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:04.995 [print] {
"resourceType": "Observation",
"id": "21979",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:08.003+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:21:04.995 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:21:05.831 [print] {
"resourceType": "Observation",
"id": "21979",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:08.003+02:00",
"source": "#b7xIxyWtkDQVqG1a",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:21:06.484 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:21:07.546 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:21:09.719+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:21:09.719+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:21:07.547 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:08.457 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:08.457 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0BCrXSvfqCctnK86"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21980/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21980/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:08.458 [print] {
"resourceType": "Observation",
"id": "21980",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:11.691+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:21:08.458 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:08.459 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:08.459 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0BCrXSvfqCctnK86"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21980/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21980/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:08.459 [print] {
"resourceType": "Observation",
"id": "21980",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:11.691+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:21:08.459 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:21:09.087 [print] {
"resourceType": "Observation",
"id": "21980",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:11.691+02:00",
"source": "#0BCrXSvfqCctnK86",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:21:09.935 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:21:10.563 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:21:13.169+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:21:13.169+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:21:10.565 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:11.482 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:11.482 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"75bXe9ntzP87jqNk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21981/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21981/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:11.482 [print] {
"resourceType": "Observation",
"id": "21981",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:14.710+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:21:11.482 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:11.484 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:11.484 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"75bXe9ntzP87jqNk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21981/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21981/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:11.484 [print] {
"resourceType": "Observation",
"id": "21981",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:14.710+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:21:11.484 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:21:12.094 [print] {
"resourceType": "Observation",
"id": "21981",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:14.710+02:00",
"source": "#75bXe9ntzP87jqNk",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:21:12.787 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:21:13.381 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:21:16.009+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:21:16.009+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:21:13.383 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:14.018 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:14.018 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uWsNL4p9BDVIxRbj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21982/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21982/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:14.019 [print] {
"resourceType": "Observation",
"id": "21982",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:17.232+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:21:14.019 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:14.020 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:14.020 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uWsNL4p9BDVIxRbj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21982/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21982/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:14.020 [print] {
"resourceType": "Observation",
"id": "21982",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:17.232+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:21:14.020 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:21:14.647 [print] {
"resourceType": "Observation",
"id": "21982",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:17.232+02:00",
"source": "#uWsNL4p9BDVIxRbj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:21:15.454 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:21:17.325 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:21:18.689+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:21:18.689+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:21:17.327 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:18.540 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:18.540 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AdxlXWcpjo8VQmrh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21983/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21983/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:18.540 [print] {
"resourceType": "Observation",
"id": "21983",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:21.758+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:21:18.540 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:18.542 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:18.542 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AdxlXWcpjo8VQmrh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21983/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21983/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:18.542 [print] {
"resourceType": "Observation",
"id": "21983",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:21.758+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:21:18.542 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:21:19.202 [print] {
"resourceType": "Observation",
"id": "21983",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:21.758+02:00",
"source": "#AdxlXWcpjo8VQmrh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:21:26.514 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:21:27.116 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:21:29.752+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:21:29.752+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:21:27.118 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:27.741 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:27.742 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AX47omowuuBWkbg2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21984/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21984/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:27.742 [print] {
"resourceType": "Observation",
"id": "21984",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:30.978+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:21:27.742 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:27.743 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:27.743 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AX47omowuuBWkbg2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21984/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21984/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:27.743 [print] {
"resourceType": "Observation",
"id": "21984",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:30.978+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:21:27.743 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:21:29.354 [print] {
"resourceType": "Observation",
"id": "21984",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:30.978+02:00",
"source": "#AX47omowuuBWkbg2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:21:30.317 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:21:30.928 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:21:33.551+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:21:33.551+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:21:30.929 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:31.562 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:31.562 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jmdxlTafoJgrSKZ4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21985/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21985/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:31.562 [print] {
"resourceType": "Observation",
"id": "21985",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:34.792+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:21:31.562 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:31.563 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:31.563 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jmdxlTafoJgrSKZ4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21985/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21985/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:31.563 [print] {
"resourceType": "Observation",
"id": "21985",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:34.792+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:21:31.563 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:21:32.172 [print] {
"resourceType": "Observation",
"id": "21985",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:34.792+02:00",
"source": "#jmdxlTafoJgrSKZ4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:21:34.853 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:21:35.446 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:21:38.090+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:21:38.090+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:21:35.447 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:36.137 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:36.137 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kZURd1TiqHUFOya0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21986/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21986/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:36.137 [print] {
"resourceType": "Observation",
"id": "21986",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:39.369+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:21:36.137 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:36.138 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:36.138 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kZURd1TiqHUFOya0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21986/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21986/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:36.138 [print] {
"resourceType": "Observation",
"id": "21986",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:39.369+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:21:36.138 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:21:36.947 [print] {
"resourceType": "Observation",
"id": "21986",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:39.369+02:00",
"source": "#kZURd1TiqHUFOya0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:21:38.418 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:21:39.032 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:21:41.655+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:21:41.655+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:21:39.034 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:40.076 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:40.076 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"avoucMMtnnrnz8cB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21987/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21987/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:40.076 [print] {
"resourceType": "Observation",
"id": "21987",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:43.296+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:21:40.076 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:40.078 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"979"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:40.078 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"avoucMMtnnrnz8cB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21987/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21987/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:40.078 [print] {
"resourceType": "Observation",
"id": "21987",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:43.296+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:21:40.078 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:21:40.702 [print] {
"resourceType": "Observation",
"id": "21987",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:43.296+02:00",
"source": "#avoucMMtnnrnz8cB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:21:41.365 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:21:41.979 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:21:44.597+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:21:44.597+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:21:41.980 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:42.843 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:42.843 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4Pl70eJBMz0YDztI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21988/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21988/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:42.843 [print] {
"resourceType": "Observation",
"id": "21988",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:46.062+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:21:42.843 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:42.844 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:42.844 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4Pl70eJBMz0YDztI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21988/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21988/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:42.844 [print] {
"resourceType": "Observation",
"id": "21988",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:46.062+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:21:42.844 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:21:43.484 [print] {
"resourceType": "Observation",
"id": "21988",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:46.062+02:00",
"source": "#4Pl70eJBMz0YDztI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:21:44.126 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:21:46.023 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:21:47.338+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:21:47.338+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:21:46.024 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:46.660 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:46.660 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aRoeFavjzui0xsWv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21989/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21989/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:46.660 [print] {
"resourceType": "Observation",
"id": "21989",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:49.887+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:21:46.660 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:46.661 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:46.661 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aRoeFavjzui0xsWv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21989/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21989/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:46.661 [print] {
"resourceType": "Observation",
"id": "21989",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:49.887+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:21:46.661 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:21:47.310 [print] {
"resourceType": "Observation",
"id": "21989",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:49.887+02:00",
"source": "#aRoeFavjzui0xsWv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:21:47.958 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:21:48.574 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:21:51.185+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:21:51.185+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:21:48.575 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:49.439 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:49.439 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5depln4JtQ8OI8uy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21990/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21990/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:49.439 [print] {
"resourceType": "Observation",
"id": "21990",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:52.671+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:21:49.439 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:49.441 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:49.441 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5depln4JtQ8OI8uy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21990/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21990/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:49.441 [print] {
"resourceType": "Observation",
"id": "21990",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:52.671+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:21:49.441 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:21:51.837 [print] {
"resourceType": "Observation",
"id": "21990",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:52.671+02:00",
"source": "#5depln4JtQ8OI8uy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:21:52.460 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:21:53.078 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:21:55.696+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:21:55.696+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:21:53.080 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:53.733 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:53.733 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"N1uHcjsBSl6B4zfW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21991/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21991/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:53.733 [print] {
"resourceType": "Observation",
"id": "21991",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:56.937+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:21:53.733 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:53.735 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:53.735 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"N1uHcjsBSl6B4zfW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21991/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21991/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:53.735 [print] {
"resourceType": "Observation",
"id": "21991",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:56.937+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:21:53.735 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:21:54.572 [print] {
"resourceType": "Observation",
"id": "21991",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:56.937+02:00",
"source": "#N1uHcjsBSl6B4zfW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:21:55.197 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:21:55.811 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:21:58.433+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:21:58.433+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:21:55.812 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:56.435 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:56.435 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6sPsyY2kBEo40QZd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21992/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21992/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:56.435 [print] {
"resourceType": "Observation",
"id": "21992",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:59.670+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:21:56.435 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:56.436 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:56.436 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6sPsyY2kBEo40QZd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21992/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:21:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21992/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:21:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:56.436 [print] {
"resourceType": "Observation",
"id": "21992",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:59.670+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:21:56.436 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:21:57.153 [print] {
"resourceType": "Observation",
"id": "21992",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:21:59.670+02:00",
"source": "#6sPsyY2kBEo40QZd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:21:58.065 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:21:59.033 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:22:01.301+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:22:01.301+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:21:59.034 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:59.700 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:59.700 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FmBvEgANvdN19WZJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21993/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21993/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:59.700 [print] {
"resourceType": "Observation",
"id": "21993",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:02.915+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:21:59.700 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:21:59.701 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:21:59.701 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FmBvEgANvdN19WZJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21993/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21993/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:21:59.701 [print] {
"resourceType": "Observation",
"id": "21993",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:02.915+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:21:59.701 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:22:00.337 [print] {
"resourceType": "Observation",
"id": "21993",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:02.915+02:00",
"source": "#FmBvEgANvdN19WZJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:22:00.984 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:22:01.599 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:22:04.204+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:22:04.204+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:22:01.600 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:02.219 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:02.219 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fb1zOMVCJMmGTXAJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21994/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21994/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:02.219 [print] {
"resourceType": "Observation",
"id": "21994",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:05.435+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:22:02.219 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:02.220 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:02.220 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fb1zOMVCJMmGTXAJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21994/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21994/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:02.220 [print] {
"resourceType": "Observation",
"id": "21994",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:05.435+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:22:02.220 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:22:03.414 [print] {
"resourceType": "Observation",
"id": "21994",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:05.435+02:00",
"source": "#fb1zOMVCJMmGTXAJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:22:04.044 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:22:05.309 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:22:07.275+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:22:07.275+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:22:05.311 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:05.908 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:05.908 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bDU0ew1IIIuQr44F"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21995/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21995/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:05.908 [print] {
"resourceType": "Observation",
"id": "21995",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:09.140+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:22:05.908 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:05.909 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:05.909 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bDU0ew1IIIuQr44F"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21995/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21995/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:05.909 [print] {
"resourceType": "Observation",
"id": "21995",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:09.140+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:22:05.910 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:22:06.552 [print] {
"resourceType": "Observation",
"id": "21995",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:09.140+02:00",
"source": "#bDU0ew1IIIuQr44F",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:22:07.159 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:22:07.981 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:22:10.396+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:22:10.396+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:22:07.983 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:08.673 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:08.673 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"P9Q1bpEmPplvgj1e"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21996/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21996/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:08.673 [print] {
"resourceType": "Observation",
"id": "21996",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:11.907+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:22:08.673 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:08.674 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:08.674 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"P9Q1bpEmPplvgj1e"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21996/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21996/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:08.674 [print] {
"resourceType": "Observation",
"id": "21996",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:11.907+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:22:08.674 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:22:09.486 [print] {
"resourceType": "Observation",
"id": "21996",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:11.907+02:00",
"source": "#P9Q1bpEmPplvgj1e",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:22:10.095 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:22:11.145 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:22:13.331+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:22:13.331+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:22:11.147 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:11.763 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:11.763 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Cvar6z3WFb9aZ712"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21997/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21997/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:11.763 [print] {
"resourceType": "Observation",
"id": "21997",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:14.996+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:22:11.763 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:11.764 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:11.764 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Cvar6z3WFb9aZ712"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21997/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21997/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:11.764 [print] {
"resourceType": "Observation",
"id": "21997",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:14.996+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:22:11.764 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:22:12.514 [print] {
"resourceType": "Observation",
"id": "21997",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:14.996+02:00",
"source": "#Cvar6z3WFb9aZ712",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:22:16.153 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:22:16.774 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:22:19.384+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:22:19.384+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:22:16.776 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:17.413 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:17.414 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YyyhhbYSs8pAbGMn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21998/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21998/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:17.414 [print] {
"resourceType": "Observation",
"id": "21998",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:20.648+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:22:17.414 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:17.415 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:17.415 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YyyhhbYSs8pAbGMn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21998/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21998/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:17.415 [print] {
"resourceType": "Observation",
"id": "21998",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:20.648+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:22:17.415 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:22:18.263 [print] {
"resourceType": "Observation",
"id": "21998",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:20.648+02:00",
"source": "#YyyhhbYSs8pAbGMn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:22:19.898 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:22:20.522 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:22:23.116+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:22:23.116+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:22:20.524 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:21.134 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:21.134 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AWevtySxqegLI1fH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21999/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21999/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:21.135 [print] {
"resourceType": "Observation",
"id": "21999",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:24.362+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:22:21.135 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:21.136 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:21.136 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AWevtySxqegLI1fH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21999/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/21999/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:21.136 [print] {
"resourceType": "Observation",
"id": "21999",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:24.362+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:22:21.136 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:22:32.636 [print] {
"resourceType": "Observation",
"id": "21999",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:24.362+02:00",
"source": "#AWevtySxqegLI1fH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:22:33.245 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:22:33.864 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:22:36.481+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:22:36.481+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:22:33.866 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:34.700 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:34.700 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tsF3GfQ74UjlW6gx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22000/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22000/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:34.700 [print] {
"resourceType": "Observation",
"id": "22000",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:37.707+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:22:34.700 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:34.701 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:34.701 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tsF3GfQ74UjlW6gx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22000/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22000/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:34.702 [print] {
"resourceType": "Observation",
"id": "22000",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:37.707+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:22:34.702 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:22:35.513 [print] {
"resourceType": "Observation",
"id": "22000",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:37.707+02:00",
"source": "#tsF3GfQ74UjlW6gx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:22:36.183 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:22:38.402 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:22:39.402+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:22:39.402+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:22:38.404 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:39.035 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:39.035 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"q9si8P6LzZWKhq6J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22001/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22001/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:39.035 [print] {
"resourceType": "Observation",
"id": "22001",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:42.265+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:22:39.036 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:39.037 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:39.037 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"q9si8P6LzZWKhq6J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22001/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22001/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:39.037 [print] {
"resourceType": "Observation",
"id": "22001",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:42.265+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:22:39.037 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:22:39.743 [print] {
"resourceType": "Observation",
"id": "22001",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:42.265+02:00",
"source": "#q9si8P6LzZWKhq6J",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:22:40.359 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:22:40.979 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:22:43.586+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:22:43.586+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:22:40.980 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:46.623 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:46.623 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lB1MUX2LHB2Nf6Sr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22002/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22002/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:46.623 [print] {
"resourceType": "Observation",
"id": "22002",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:49.845+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:22:46.623 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:46.625 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:46.625 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lB1MUX2LHB2Nf6Sr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22002/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22002/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:46.625 [print] {
"resourceType": "Observation",
"id": "22002",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:49.845+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:22:46.625 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:22:47.241 [print] {
"resourceType": "Observation",
"id": "22002",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:49.845+02:00",
"source": "#lB1MUX2LHB2Nf6Sr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:22:47.878 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:22:49.488 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:22:51.108+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:22:51.108+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:22:49.490 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:50.148 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:50.148 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cTzwOQmeg34dObrp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22003/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22003/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:50.148 [print] {
"resourceType": "Observation",
"id": "22003",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:53.378+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:22:50.148 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:50.150 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:50.150 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cTzwOQmeg34dObrp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22003/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22003/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:50.150 [print] {
"resourceType": "Observation",
"id": "22003",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:53.378+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:22:50.150 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:22:50.975 [print] {
"resourceType": "Observation",
"id": "22003",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:53.378+02:00",
"source": "#cTzwOQmeg34dObrp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:22:51.604 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:22:52.245 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:22:54.837+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:22:54.837+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:22:52.246 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:52.843 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:52.843 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XUKCgF91ChFA0FkG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22004/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22004/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:52.843 [print] {
"resourceType": "Observation",
"id": "22004",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:56.080+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:22:52.843 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:52.845 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:52.845 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XUKCgF91ChFA0FkG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22004/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22004/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:52.845 [print] {
"resourceType": "Observation",
"id": "22004",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:56.080+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:22:52.845 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:22:53.449 [print] {
"resourceType": "Observation",
"id": "22004",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:56.080+02:00",
"source": "#XUKCgF91ChFA0FkG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:22:54.107 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:22:54.754 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:22:57.323+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:22:57.323+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:22:54.755 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:55.381 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:55.381 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ml96xkh1Ig4pphYj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22005/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22005/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:55.382 [print] {
"resourceType": "Observation",
"id": "22005",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:58.612+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:22:55.382 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:55.383 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:55.383 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ml96xkh1Ig4pphYj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22005/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:22:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22005/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:22:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:55.383 [print] {
"resourceType": "Observation",
"id": "22005",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:58.612+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:22:55.383 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:22:56.027 [print] {
"resourceType": "Observation",
"id": "22005",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:22:58.612+02:00",
"source": "#ml96xkh1Ig4pphYj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:22:56.668 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:22:57.296 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:22:59.906+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:22:59.906+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:22:57.297 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:57.902 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:57.903 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JwK0EnP2m7TQVdIn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22006/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22006/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:57.903 [print] {
"resourceType": "Observation",
"id": "22006",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:01.138+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:22:57.903 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:22:57.904 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:22:57.904 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JwK0EnP2m7TQVdIn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22006/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22006/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:22:57.904 [print] {
"resourceType": "Observation",
"id": "22006",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:01.138+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:22:57.904 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:22:58.517 [print] {
"resourceType": "Observation",
"id": "22006",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:01.138+02:00",
"source": "#JwK0EnP2m7TQVdIn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:22:59.138 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:22:59.786 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:23:02.364+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:23:02.364+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:22:59.787 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:00.413 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:00.413 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JTpG1DVxRGoA92iQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22007/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22007/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:00.413 [print] {
"resourceType": "Observation",
"id": "22007",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:03.645+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:23:00.413 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:00.414 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:00.414 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JTpG1DVxRGoA92iQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22007/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22007/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:00.414 [print] {
"resourceType": "Observation",
"id": "22007",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:03.645+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:23:00.414 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:23:01.032 [print] {
"resourceType": "Observation",
"id": "22007",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:03.645+02:00",
"source": "#JTpG1DVxRGoA92iQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:23:01.681 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:23:02.495 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:23:04.917+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:23:04.917+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:23:02.496 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:03.107 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:03.107 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5WqqAk8LuqZecskn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22008/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22008/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:03.108 [print] {
"resourceType": "Observation",
"id": "22008",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:06.339+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:23:03.108 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:03.109 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:03.109 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5WqqAk8LuqZecskn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22008/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22008/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:03.109 [print] {
"resourceType": "Observation",
"id": "22008",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:06.339+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:23:03.109 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:23:03.739 [print] {
"resourceType": "Observation",
"id": "22008",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:06.339+02:00",
"source": "#5WqqAk8LuqZecskn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:23:04.427 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:23:05.046 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:23:07.628+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:23:07.628+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:23:05.047 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:05.723 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:05.723 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jJI1y8BUW2LwDgtI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22009/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22009/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:05.723 [print] {
"resourceType": "Observation",
"id": "22009",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:08.896+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:23:05.723 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:05.724 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:05.724 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jJI1y8BUW2LwDgtI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22009/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22009/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:05.724 [print] {
"resourceType": "Observation",
"id": "22009",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:08.896+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:23:05.724 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:23:06.383 [print] {
"resourceType": "Observation",
"id": "22009",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:08.896+02:00",
"source": "#jJI1y8BUW2LwDgtI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:23:07.057 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:23:08.046 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:23:10.288+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:23:10.288+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:23:08.047 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:08.667 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:08.667 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jiudYzYICTFjlHje"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22010/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22010/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:08.667 [print] {
"resourceType": "Observation",
"id": "22010",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:11.891+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:23:08.667 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:08.668 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:08.668 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jiudYzYICTFjlHje"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22010/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22010/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:08.668 [print] {
"resourceType": "Observation",
"id": "22010",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:11.891+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:23:08.668 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:23:09.294 [print] {
"resourceType": "Observation",
"id": "22010",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:11.891+02:00",
"source": "#jiudYzYICTFjlHje",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:23:10.914 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:23:11.812 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:23:14.150+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:23:14.150+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:23:11.813 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:13.453 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:13.453 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9LCAlgBCHGiYxhmD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22011/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22011/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:13.454 [print] {
"resourceType": "Observation",
"id": "22011",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:16.680+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:23:13.454 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:13.455 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:13.455 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9LCAlgBCHGiYxhmD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22011/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22011/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:13.455 [print] {
"resourceType": "Observation",
"id": "22011",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:16.680+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:23:13.455 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:23:15.359 [print] {
"resourceType": "Observation",
"id": "22011",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:16.680+02:00",
"source": "#9LCAlgBCHGiYxhmD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:23:15.992 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:23:17.568 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:23:19.226+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:23:19.226+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:23:17.570 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:18.234 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:18.234 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7gXfeG9Ew0W5fmR6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22012/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22012/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:18.234 [print] {
"resourceType": "Observation",
"id": "22012",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:21.455+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:23:18.234 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:18.235 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:18.235 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7gXfeG9Ew0W5fmR6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22012/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22012/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:18.235 [print] {
"resourceType": "Observation",
"id": "22012",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:21.455+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:23:18.235 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:23:18.840 [print] {
"resourceType": "Observation",
"id": "22012",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:21.455+02:00",
"source": "#7gXfeG9Ew0W5fmR6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:23:19.488 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:23:20.299 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:23:22.723+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:23:22.723+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:23:20.301 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:20.935 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:20.935 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qTtJtc6KTH25CUPQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22013/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22013/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:20.936 [print] {
"resourceType": "Observation",
"id": "22013",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:24.151+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:23:20.936 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:20.937 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:20.937 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qTtJtc6KTH25CUPQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22013/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22013/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:20.937 [print] {
"resourceType": "Observation",
"id": "22013",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:24.151+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:23:20.937 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:23:22.569 [print] {
"resourceType": "Observation",
"id": "22013",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:24.151+02:00",
"source": "#qTtJtc6KTH25CUPQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:23:23.181 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:23:23.795 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:23:26.415+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:23:26.415+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:23:23.797 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:24.398 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:24.398 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EyFTa1NN7aLHJQQU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22014/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22014/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:24.398 [print] {
"resourceType": "Observation",
"id": "22014",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:27.631+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:23:24.398 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:24.400 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:24.400 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EyFTa1NN7aLHJQQU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22014/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22014/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:24.400 [print] {
"resourceType": "Observation",
"id": "22014",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:27.631+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:23:24.400 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:23:25.013 [print] {
"resourceType": "Observation",
"id": "22014",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:27.631+02:00",
"source": "#EyFTa1NN7aLHJQQU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:23:25.650 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:23:26.331 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:23:28.888+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:23:28.888+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:23:26.333 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:26.942 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:26.942 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TlAeiNZUzvn8JaJI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22015/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22015/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:26.942 [print] {
"resourceType": "Observation",
"id": "22015",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:30.177+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:23:26.942 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:26.943 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:26.943 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TlAeiNZUzvn8JaJI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22015/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22015/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:26.943 [print] {
"resourceType": "Observation",
"id": "22015",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:30.177+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:23:26.943 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:23:27.548 [print] {
"resourceType": "Observation",
"id": "22015",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:30.177+02:00",
"source": "#TlAeiNZUzvn8JaJI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:23:28.175 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:23:28.805 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:23:31.409+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:23:31.409+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:23:28.806 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:29.432 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:29.433 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QN5IfkSSVA1KVv5b"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22016/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22016/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:29.433 [print] {
"resourceType": "Observation",
"id": "22016",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:32.658+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:23:29.433 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:29.434 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:29.434 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QN5IfkSSVA1KVv5b"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22016/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22016/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:29.434 [print] {
"resourceType": "Observation",
"id": "22016",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:32.658+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:23:29.434 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:23:30.240 [print] {
"resourceType": "Observation",
"id": "22016",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:32.658+02:00",
"source": "#QN5IfkSSVA1KVv5b",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:23:30.857 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:23:31.498 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:23:34.090+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:23:34.090+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:23:31.499 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:32.107 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:32.107 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ColmitKI32Sj51D0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22017/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22017/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:32.107 [print] {
"resourceType": "Observation",
"id": "22017",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:35.341+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:23:32.107 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:32.108 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:32.108 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ColmitKI32Sj51D0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22017/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22017/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:32.109 [print] {
"resourceType": "Observation",
"id": "22017",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:35.341+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:23:32.109 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:23:32.715 [print] {
"resourceType": "Observation",
"id": "22017",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:35.341+02:00",
"source": "#ColmitKI32Sj51D0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:23:33.333 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:23:33.962 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:23:36.564+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:23:36.564+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:23:33.963 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:34.578 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:34.578 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bhM0JAShvywt2Wjc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22018/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22018/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:34.578 [print] {
"resourceType": "Observation",
"id": "22018",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:37.805+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:23:34.578 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:34.580 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:34.580 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bhM0JAShvywt2Wjc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22018/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22018/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:34.580 [print] {
"resourceType": "Observation",
"id": "22018",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:37.805+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:23:34.580 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:23:35.212 [print] {
"resourceType": "Observation",
"id": "22018",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:37.805+02:00",
"source": "#bhM0JAShvywt2Wjc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:23:36.401 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:23:37.022 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:23:39.638+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:23:39.638+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:23:37.023 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:37.645 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:37.646 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lGfAp8H1xH0ETU0U"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22019/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22019/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:37.646 [print] {
"resourceType": "Observation",
"id": "22019",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:40.878+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:23:37.646 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:37.647 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"562"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:37.647 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lGfAp8H1xH0ETU0U"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22019/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22019/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:37.647 [print] {
"resourceType": "Observation",
"id": "22019",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:40.878+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:23:37.647 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:23:38.265 [print] {
"resourceType": "Observation",
"id": "22019",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:40.878+02:00",
"source": "#lGfAp8H1xH0ETU0U",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:23:38.884 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 17ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 17ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:23:39.724 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:23:42.106+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:23:42.106+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:23:39.725 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
},
"component": [
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:41.387 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:41.387 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"p3mJWMIYkeQZPIoc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22020/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22020/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:41.387 [print] {
"resourceType": "Observation",
"id": "22020",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:44.609+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:23:41.387 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:23:41.388 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"560"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:23:41.388 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"p3mJWMIYkeQZPIoc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22020/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 10:23:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/22020/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 10:23:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:23:41.388 [print] {
"resourceType": "Observation",
"id": "22020",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:44.609+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:23:41.388 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:23:42.988 [print] {
"resourceType": "Observation",
"id": "22020",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T12:23:44.609+02:00",
"source": "#p3mJWMIYkeQZPIoc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:23:43.610 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:23:44.234 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T12:23:46.830+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T12:23:46.830+02:00"
}
]
}